Я не совсем уверен, правильно ли я понял, но вы можете попробовать использовать этот подход.
# creating dictionaries and data frames
df1 = {'Store_ID': ['ABC_1', 'ABC_1', 'ABC_1', 'ABC_1', 'ABC_1', 'ABC_1', 'ABC_1', 'ABC_1', 'ABC_1', 'ABC_1'],
'Visit_Datetime':['01-01-2018', '02-01-2018', '03-01-2018', '04-01-2018', '05-01-2018', '06-01-2018','07-01-2018', '08-01-2018', '09-01-2018', '10-01-2018'],
'Visitors': [45, 60, 40, 80, 60, 50, 70, 30, 50, 60]}
df2 = {'Datetime': ['01-01-2018', '02-01-2018', '03-01-2018', '04-01-2018', '05-01-2018', '06-01-2018', '07-01-2018'],
'Day': ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
'Weekly_Holiday':[1,0,1,0,0,1,0]}
df1 = pd.DataFrame(df1)
df2 = pd.DataFrame(df2)
# setting dates as datetime objects
df1['Visit_Datetime'] = pd.to_datetime(df1['Visit_Datetime'], format='%m-%d-%Y')
df2['Datetime'] = pd.to_datetime(df2['Datetime'], format='%m-%d-%Y')
# merging on dates
merged_df = pd.merge(df1,df2, how="left", left_on='Visit_Datetime', right_on='Datetime')
# splitting into train & test data frames
train_df = merged_df[merged_df['Visit_Datetime'] <= '2018-05-01']
train_df = train_df[target_df['Weekly_Holiday'] != 1]
test_df = merged_df[merged_df['Visit_Datetime'] > '2018-05-01']
test_df = test_df[test_df['Weekly_Holiday'] != 1]