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

train = pd.read_csv('/kaggle/input/rossmann-store-sales/train.csv')
test = pd.read_csv('/kaggle/input/rossmann-store-sales/test.csv')
store = pd.read_csv('/kaggle/input/rossmann-store-sales/store.csv')

train = train[train['Sales'] > 0]

train['Date'] = pd.to_datetime(train['Date'])
train.sort_values(by='Date', ascending=True, inplace=True)
train.reset_index(inplace=True)
train.drop('index', axis=1, inplace=True)
start_date = train['Date'][0]
end_date = train['Date'][844337]
print('Start date :', start_date)
print('End date :', end_date)