Hi. In the exercise proposed in the employment section, how can I join survey_df with dev_type_df if they don’t have any column in common? Can I use the indexes? How?
If they have some column that you know is common for them, just has different name:
df1.merge(df2, left_on='df1 column name', right_on='df2 column name')
It will merge the dataframes on specified columns.
If you want them to merge basing on their indices:
df1.merge(df2, left_index=True, right_index=True)
2 Likes
Thanks! It’s what I was looking for.