Skip to content

Conversation

lukemanley
Copy link
Member

similar to #54395 (I should have checked Series.count in that PR)

@lukemanley
Copy link
Member Author

lukemanley commented Aug 13, 2023

Looks like this is failing due to the following inconsistency in return types for boolean arrays vs other arrays:

In [1]: import pandas as pd

In [2]: type(pd.Series([1, 0 , 1]).std())
Out[2]: float

In [3]: type(pd.Series([True, False, True]).std())
Out[3]: numpy.float64

This is tested behavior in test_reductions_return_types.

@mroeschke mroeschke added this to the 2.2 milestone Aug 15, 2023
@mroeschke mroeschke merged commit 1bffa5e into pandas-dev:main Aug 15, 2023
@mroeschke
Copy link
Member

Thanks @lukemanley

mroeschke pushed a commit to mroeschke/pandas that referenced this pull request Aug 18, 2023
* DOC: Series.count remove mention of "level"

* leave return type as-is
@lukemanley lukemanley deleted the series-count branch September 6, 2023 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants