Created
April 14, 2022 16:40
-
-
Save mepsrajput/f7af2dc00eb8e0b2b30c354f193a8cfb to your computer and use it in GitHub Desktop.
This file contains 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['GENRE'].value_counts(dropna=False) | |
datay = pd.DataFrame({ | |
'GENRE': datax.index, | |
'Frequency': datax.values, | |
'Percent': ((datax.values/datax.values.sum())*100).round(2), | |
'Cumulative Frequency': datax.values.cumsum(), | |
'Cumulative Percent': ((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