I have a dataframe where I need to insert dates for every key. Both come from two seperate dataframes with no columns to merge on. I assume it would maybe be through some for loop but not sure how it would look. Here are the two original dataframes:
df_this = pd.DataFrame({'scu_key': [4, 8, 10, 12]})
df_that = pd.DataFrame({'dates': ['02-2018', '03-2018', '04-2018', '05-2018']})
df_all_that = pd.DataFrame({'scu_key':[4, 4, 4, 4, 8, 8, 8, 8, 10, 10, 10, 10, 12, 12, 12, 12], 'dates': ['02-2018', '03-2018', '04-2018', '05-2018','02-2018', '03-2018', '04-2018', '05-2018','02-2018', '03-2018', '04-2018', '05-2018','02-2018', '03-2018', '04-2018', '05-2018']})
So as you can see there are repeat values for 'scu_key' because each scu_key will have each of the dates attached to it.