image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

items = pd.read_csv('/kaggle/input/competitive-data-science-predict-future-sales/items.csv')
shops_data = pd.read_csv('/kaggle/input/competitive-data-science-predict-future-sales/shops.csv')
sales_train = pd.read_csv('/kaggle/input/competitive-data-science-predict-future-sales/sales_train.csv')
test = pd.read_csv('/kaggle/input/competitive-data-science-predict-future-sales/test.csv')
sample_submission = pd.read_csv('/kaggle/input/competitive-data-science-predict-future-sales/sample_submission.csv')
item_category = pd.read_csv('/kaggle/input/competitive-data-science-predict-future-sales/item_categories.csv')

sales_train = sales_train[sales_train.shop_id.isin(test.shop_id.unique())]
sales_train = sales_train[sales_train.item_id.isin(test.item_id.unique())]

plt.figure(figsize=(13, 5))
plt.subplot(121)
plt.hist(sales_train.shop_id, color='red', label='train', density=True, alpha=0.3)
plt.hist(test.shop_id, color='blue', label='test', density=True, alpha=0.3)
plt.ylabel('counts')
plt.xlabel('shop_id')
plt.legend()
plt.subplot(122)
plt.hist(sales_train.item_id, color='red', label='train', density=True, alpha=0.3)
plt.hist(test.item_id, color='blue', label='test', density=True, alpha=0.3)
plt.ylabel('counts')
plt.xlabel('item_id')
plt.legend()
plt.show()