-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
value_counts() can now compute relative frequencies. #2710
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
Conversation
Can you please add a test case? |
Test case now provided ;) |
Deferring til next release. Need to think about whether |
I think |
Here's what matplotlib & numpy do: http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.hist http://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html Both of the above links are worth reading for further clarification of how they handle this. |
It seems a bit weird to talk about "density" with the discrete-sounding value_ counts, but I can see how it could make other things consistent... density would certainly be a good addition when bucketing.
|
Barring loud outcry, I plan to merge this using "normalize" as the keyword very soon. |
+1 |
Thanks @y-p . Do you have an opinion on whether something like https://github.com/lexual/pandas-love-ponies should live outside Pandas or inside Pandas? I never got any responses to my post to the mailing list a month ago. |
My opinion is that pandas is in constant feature-creep japordy, and this others may disagree. |
My code is completely Django specific so imagine it would be separate to sql alchemy work (although I haven't had a close look at the sql alchemy stuff). So I imagine you're probably right that it should live outside of Pandas unless it starts getting widespread use. |
No description provided.