Skip to content

value_counts: name and index'es name #25795

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

Closed
kuraga opened this issue Mar 20, 2019 · 3 comments
Closed

value_counts: name and index'es name #25795

kuraga opened this issue Mar 20, 2019 · 3 comments
Labels
Needs Info Clarification about behavior needed to assess issue

Comments

@kuraga
Copy link

kuraga commented Mar 20, 2019

Good day!

s = pd.Series(np.arange(10), name='items')
c = s.value_counts()

c.name  #=> 'items'

c.index.name  #=> None

IMHO that's very strange. Values of c are quantities/counts/etc. not "items". "Items" are represented in c.index. No?

What do you think?

Thanks!

@WillAyd
Copy link
Member

WillAyd commented Mar 22, 2019

The name here is simply being carried over from the originating Series. Are you asking for a particular enhancement that differs from that?

@WillAyd WillAyd added the Needs Info Clarification about behavior needed to assess issue label Mar 22, 2019
@kuraga
Copy link
Author

kuraga commented Mar 23, 2019

@WillAyd , yes:

c.name  #=> 'counts'
c.index.name  #=> 'items'

@kuraga kuraga closed this as completed Mar 26, 2019
@MarcoGorelli
Copy link
Member

Thanks @kuraga for the report - not sure why you closed this, but I've opened a new issue to take your suggestion forwards #49497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Info Clarification about behavior needed to assess issue
Projects
None yet
Development

No branches or pull requests

3 participants