text_plain_output_1.png
import pandas as pd

url = '../input/dataquest2020/energy_train.csv'
df_training = pd.read_csv(url)

url = '../input/dataquest2020/energy_test.csv'
df_testing = pd.read_csv(url)

df_training['source'] = 'train'
df_testing['source'] = 'test'

df = pd.concat([df_training, df_testing], axis=0, ignore_index=True)
df

def secSinceNoon(datTimStr):
    tt = pd.to_datetime(datTimStr).time()
    return (tt.hour * 3600 + tt.minute * 60 + tt.second) / 60.0

df['SSM'] = df['timestamp'].apply(secSinceNoon)
df['SSM']