text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

data = pd.read_csv('../input/onlineretail/OnlineRetail.csv', encoding='cp1252', header=0)

data = data.dropna()

Rev_Coustomer = data.groupby('CustomerID')['Revenue'].sum().sort_values(ascending=False).reset_index()[:15]

Rev_Country = data.groupby('Type')['Revenue'].sum().sort_values(ascending=False).reset_index()[:20]
plt.xticks(rotation=40, ha='right')

Rev_Country = data.groupby('InvoiceNo')['Revenue'].sum().sort_values(ascending=False).reset_index()[:20]
plt.figure(figsize=(12, 5))
sns.barplot(x='InvoiceNo', y='Revenue', data=Rev_Country)
plt.xticks(rotation=40, ha='right')
plt.title('Total Revenue of InvoiceNo')
plt.xlabel('InvoiceNo')
plt.ylabel('Total Revenue')