How to catch error if parquet file is empty? #1931
-
how can I check if a parquet file is empty? or know that the data frame generated from reading the parquet file from s3 is empty. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
my use case is: if I have an empty data frame from an ingested parquet file from s3 I don't want to do anything and just print that it's empty. otherwise, I want to do my transformations and export to s3. |
Beta Was this translation helpful? Give feedback.
-
Does vaex raise an error if a parquet file is empty? Maybe you can you a if len(df) > 0:
continue # do transformations
else:
print('dataframe is empty') |
Beta Was this translation helpful? Give feedback.
Does vaex raise an error if a parquet file is empty? Maybe you can you a
try
andexcept
there?If no error and you simply get an empty dataframe, then what's wrong with