Python Code: import pandas as pd from collections import Counter df = pd.read_csv('sales_data_sample.csv') df[['COUNTRY', 'PRODUCTLINE']] df[['COUNTRY']].value_counts() list(df[['COUNTRY']].value_counts().index) df[['PRODUCTLINE']].value_counts() cnt_country = Counter(df['COUNTRY']) cnt_country.most_common() cnt_productline = Counter(df['PRODUCTLINE'])
No comments:
Post a Comment