Skip to content

Update empty describe top and freq values#10319

Merged
hendrikmakait merged 2 commits intodask:mainfrom
jrbourbeau:empty-describe-dtype-fixup
May 31, 2023
Merged

Update empty describe top and freq values#10319
hendrikmakait merged 2 commits intodask:mainfrom
jrbourbeau:empty-describe-dtype-fixup

Conversation

@jrbourbeau
Copy link
Copy Markdown
Member

Currently, on an empty DataFrame, dask will return None for top and freq values, while pandas returns np.nan. This mismatch has been around for a while, but went unnoticed because pandas testing utilities treated None and np.nan as equivalent. With pandas-dev/pandas#52081, we now get an error.

This PR updates dask to match pandas in this case and return np.nan instead of None

Closes #10317

cc @phofl

@hendrikmakait hendrikmakait merged commit 8803b3a into dask:main May 31, 2023
@jrbourbeau jrbourbeau deleted the empty-describe-dtype-fixup branch May 31, 2023 14:52
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.

⚠️ Upstream CI failed ⚠️

2 participants