Created
April 14, 2022 14:42
-
-
Save mepsrajput/1f71dbd1cccc6f2042c70f96028391bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datax = data['state'].value_counts() | |
datay = pd.DataFrame({ | |
'state': datax.index, | |
'Frequency': datax.values, | |
'Percent': ((datax.values/datax.values.sum())*100).round(2), | |
'Cumulative Frequenc': datax.values.cumsum(), | |
'Cumulative Percen':((datax.values.cumsum()/datax.values.sum())*100).round(2) | |
}) | |
datay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment