text_plain_output_1.png
import matplotlib.pyplot as plt

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

import seaborn as sns

train = pd.read_csv('../input/tabular-playground-series-sep-2022/train.csv', index_col='row_id')
test = pd.read_csv('../input/tabular-playground-series-sep-2022/test.csv', index_col='row_id')

train.dtypes

train.nunique()

plt.figure(figsize=(16,5))
ax = sns.barplot(data=train, x='product', y='num_sold', hue='country')
ax.legend(loc='center left', bbox_to_anchor=(1, 0.5))
plt.title('Product distribution grouped by country')
plt.show()

plt.figure(figsize=(12, 5))
sns.lineplot(data=train.groupby(['date', 'store']).sum(), x='date', y='num_sold', hue='store')
plt.title('Sales by store')
plt.show()