Answers for "how to display percentage in pandas crosstab"

0

how to display percentage in pandas crosstab

pd.crosstab(df.A,df.B, normalize='index')\
    .round(4)*100

B          A      B      C
A                         
one    33.33  33.33  33.33
three  33.33  33.33  33.33
two    33.33  33.33  33.33
Posted by: Guest on January-26-2021

Code answers related to "how to display percentage in pandas crosstab"

Python Answers by Framework

Browse Popular Code Answers by Language