-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Accept empty dataframes in DataFrame.to_parquet #27341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small comments, can you add a whatsnew note (bug fixes in io), ping on green.
@@ -471,6 +471,10 @@ def test_partition_cols_supported(self, pa, df_full): | |||
assert len(dataset.partitions.partition_names) == 2 | |||
assert dataset.partitions.partition_names == set(partition_cols) | |||
|
|||
def test_empty_dataframe(self, pa): | |||
df = pd.DataFrame() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add the github issue number as a comment
@@ -566,3 +570,9 @@ def test_error_on_using_partition_cols_and_partition_on(self, fp, df_full): | |||
partition_on=partition_cols, | |||
partition_cols=partition_cols, | |||
) | |||
|
|||
def test_empty_dataframe(self, fp): | |||
df = pd.DataFrame() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
Thanks @jreback. Should this go in the whatsnew for 0.25.0 or 0.25.1? |
you can put in 0.25.0 |
lgtm. @CJStadler ping on green. |
It's green @jreback. Thanks! |
thanks! |
Fixes #27339
I wrote two tests because
fastparquet
adds a name to the index when it deserializes.black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff