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

df = pd.read_csv('/kaggle/input/time-series/JohnsonJohnson.csv')

df.drop('Unnamed: 0', axis=1, inplace=True)

df.time.unique()

train = df[df['time'] < 1980]
test = df[df['time'] >= 1980]

print('train_time', train.time.unique())
print('test_time', test.time.unique())