EDA for Level Based
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
# Unique Sources and Frequencies | |
df.SOURCE.value_counts() | |
# Unique Prices and Frequencies | |
df.PRICE.value_counts() | |
# Unique Countries and Frequencies | |
df.COUNTRY.value_counts() | |
# Total Income Accumulated by Countries | |
df.groupby('COUNTRY').PRICE.sum() | |
# Average Income Accumulated by Countries | |
df.groupby('COUNTRY').PRICE.mean() | |
# Average Income Accumulated by Sources | |
df.groupby('SOURCE').PRICE.mean() | |
# Average Income Accumulated by Countries and Sources | |
df.groupby(['COUNTRY', 'SOURCE']).PRICE.mean() | |
# Average Income Accumulated by Countries, Sources, Sex and Age | |
df.groupby(['COUNTRY', 'SOURCE', 'SEX', 'AGE']).PRICE.mean() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment