image_output_1.png
import pandas as pd

class CFG:
    n_roadways = 65
    seed = 42
def create_roadways(df):
    roads = list(range(CFG.n_roadways))
    return roads * int(len(df) / CFG.n_roadways)
def preprocess(df):
    df_ = df.copy()
    df_['roadway'] = create_roadways(df_)
    df_['time'] = pd.to_datetime(df_['time'])
    return df_

train = pd.read_csv(PATH / 'train.csv')
train = preprocess(train)
test = pd.read_csv(PATH / 'test.csv')
test = preprocess(test)
train

print(test['time'].min(), test['time'].max())
print(test['time'].max() - test['time'].min())