Skip to content

Commit

Permalink
check for pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
ion-elgreco committed Nov 18, 2023
1 parent 64d7648 commit 5d7ab06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/deltalake/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def write_deltalake(
batch_iter = data.to_reader()
elif isinstance(data, ds.Dataset):
batch_iter = data.scanner().to_reader()
elif isinstance(data, pd.DataFrame):
elif _has_pandas and isinstance(data, pd.DataFrame):
if schema is not None:
batch_iter = pa.Table.from_pandas(data, schema).to_reader()
else:
Expand Down

0 comments on commit 5d7ab06

Please sign in to comment.