text_plain_output_1.png
import pandas as pd

articles_data = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/articles.csv')
customers_data = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/customers.csv')
submission_data = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/sample_submission.csv')
trans_data = pd.read_csv('/kaggle/input/h-and-m-personalized-fashion-recommendations/transactions_train.csv')

trans_data.dtypes

trans_data['t_dat'] = trans_data['t_dat'].astype('datetime64')
trans_data.dtypes

sample_trans_data = trans_data[trans_data['year_trans'] == 2019]

sample_trans_data.isna().sum()

sample_trans_data.drop(labels=['t_dat', 'sales_channel_id'], axis=1, inplace=True)
sample_trans_data.reset_index(drop=True, inplace=True)

sample_trans_data.isna().sum()

sample_trans_data.head(5)