-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
ENH: Add normalize to crosstab #12569
Comments
I also use this type of operation in |
I like it. I'll try a few things and submit a PR. |
Relatedly,
Not related to #12558 i don't think |
might be #4003 |
@jreback don't think so -- that's double counting. This is only happens on columns with np.nan and increments by num of np.nans. |
ok if you can't find a related one, then pls open a new issue |
in fact, if you can, pls open a new issue (we'll call it and i'll tag it master), and can list a checkbox for all of the crosstab issues. (each individual one has an issue and we just refernce things) like #11485 |
It'd be great to have a simple
normalization
option for cross tab to get shares rather than frequencies.Something that would do something like:
as just an option.
(The ability to do row-normalizations and column normalizations would also be great -- so all entries in a row add to 1 or all entries in a column add to 1). Similar in behavior (for row normalizations) as:
But with a command like:
pd.crosstab(df.language, df.carrier, normalization='row')
The text was updated successfully, but these errors were encountered: