I'm stumped on this one. I have two data frames that are completely different, but I want to add a field from one to the other. I tried the following.
grouped_and_summed['schedule_code'] = df['schedule_code']
It's giving me all NAN under grouped_and_summed['schedule_code']
grouped_and_summed['schedule_code']
I tried pd.concat. That didn't work, because these two data frames have nothing in common. All I want to do is take a value, which has been parsed correctly in df['schedule_code'] and insert it into grouped_and_summed['schedule_code'].
pd.concat
df['schedule_code']
If I got it correctly, concat should do the work if you set correctly the axis:
pd.concat([grouped_and_summed, df['schedule_code']], ignore_index=True, axis=1)
1.4m articles
1.4m replys
5 comments
57.0k users