Skip to content

BUG: DataFrame[dt64].quantile(axis=1) when empty returning f8 #45294

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

Merged
merged 2 commits into from
Jan 13, 2022

Conversation

jbrockmendel
Copy link
Member

@jreback jreback added this to the 1.5 milestone Jan 10, 2022
@jreback jreback added Bug Dtype Conversions Unexpected or buggy dtype conversions Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Jan 10, 2022
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

[q], axis=axis, numeric_only=numeric_only, interpolation=interpolation
)
return res.iloc[0]
res = res_df.iloc[0]
if axis == 1 and len(self) == 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

can we do this in quantile itself?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, these cases are only reached when we dont have any blocks to operate on.

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm really ought to push this down to eliminate this type of logic in the frame itself, ok for now.

@jreback jreback merged commit 5b2f4a5 into pandas-dev:main Jan 13, 2022
@jbrockmendel jbrockmendel deleted the bugs-3 branch January 13, 2022 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Empty DataFrame(..., dtype='datetime64[ns]').quantile(..., axis=1) returns float64 dtype
3 participants