Skip to content

Adjust empty Index from fastparquet to object dtype#10179

Merged
jrbourbeau merged 3 commits intodask:mainfrom
phofl:empty_df_index_change
Apr 15, 2023
Merged

Adjust empty Index from fastparquet to object dtype#10179
jrbourbeau merged 3 commits intodask:mainfrom
phofl:empty_df_index_change

Conversation

@phofl
Copy link
Copy Markdown
Collaborator

@phofl phofl commented Apr 12, 2023

  • Closes #xxxx
  • Tests added / passed
  • Passes pre-commit run --all-files

cc @jrbourbeau

As expected, fix was relatively easy. I opened dask/fastparquet#859 to fix in fastparquet

@phofl phofl changed the title Xfail tests for fastparquet engine when df is empty Adjust empty Index from fastparquet to object dtype Apr 12, 2023
Copy link
Copy Markdown
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @phofl

cc @martindurant for visibility

Comment on lines +1119 to +1122
if (
parse_version(fastparquet.__version__) <= parse_version("2023.02.0")
and df.columns.empty
):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is a pandas version check needed here too?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added one, not strictly necessary but clearer

@jrbourbeau jrbourbeau changed the title Adjust empty Index from fastparquet to object dtype Adjust empty Index from fastparquet to object dtype Apr 15, 2023
@jrbourbeau jrbourbeau merged commit f08addd into dask:main Apr 15, 2023
@phofl phofl deleted the empty_df_index_change branch April 24, 2023 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants