Skip to content

Commit

Permalink
fix: allow empty table/report (#255)
Browse files Browse the repository at this point in the history
  • Loading branch information
michalc authored Dec 9, 2024
2 parents f45a6a4 + 76870f6 commit 0ba4ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def get_pandas_dfs():
# Convert the dataframes to PyArrow record batches
record_batches = (
pa.RecordBatch.from_pandas(df, schema=schema, preserve_index=False, nthreads=1)
for df in itertools.chain((first_df,), pandas_dfs)
for df in itertools.chain((first_df,) if first_df is not None else (), pandas_dfs)
)
first_df = None # Free memory used by the first dataframe

Expand Down

0 comments on commit 0ba4ad3

Please sign in to comment.