Skip to content

Commit

Permalink
Fix issue where pandas<1.4.0 doesn't return the number of rows
Browse files Browse the repository at this point in the history
  • Loading branch information
Dref360 committed Sep 3, 2022
1 parent f76b87c commit 56b4630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datasets/io/sql.py
Expand Up @@ -114,7 +114,7 @@ def _write(self, conn: Connection, **to_sql_kwargs) -> int:
df = self._batch_sql(offset)
written += df.to_sql(
self.table_name, conn, **to_sql_kwargs, if_exists="replace" if offset == 0 else "append"
)
) or len(df)

else:
num_rows, batch_size = len(self.dataset), self.batch_size
Expand Down

0 comments on commit 56b4630

Please sign in to comment.