-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
API: various .value_counts() result in different names / indices #49912
API: various .value_counts() result in different names / indices #49912
Conversation
doc/source/whatsnew/v2.0.0.rst
Outdated
@@ -207,6 +207,44 @@ a supported dtype: | |||
|
|||
pd.Series(["2016-01-01"], dtype="datetime64[D]") | |||
|
|||
.. _whatsnew_200.api_breaking.value_counts: | |||
|
|||
Value counts behaviour change |
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.
Something more specific like ``value_counts`` sets the resulting name to ``"count"``
would be good
doc/source/whatsnew/v2.0.0.rst
Outdated
confusion when resetting the index, and the column names would not correspond with the | ||
column values. | ||
Now, the result name will be ``'count'`` (or ``'proportion'`` if ``normalize=True`` was passed), | ||
and the index will be named after the original object. |
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.
Could you add the issue number here?
Good point on |
gentle ping 😄 do we still want to make this change? |
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.
Sure, LGTM
cheers - @jbrockmendel any further comments? |
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.
LGTM thanks for sticking with this
thanks for your reviews, much appreciated! merging then, before more conflicts come in |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.screenshot of whatsnewnote: