I have these two dataframes:
avg_rating
movieId rating
1 3.921240
2 3.211977
3 3.151040
4 2.861393
5 3.064592
data
movieId title year
0 1 Toy Story (1995) 1995
1 2 Jumanji (1995) 1995
2 3 Grumpier Old Men (1995) 1995
3 4 Waiting to Exhale (1995) 1995
4 5 Father of the Bride Part II (1995) 1995
I would like to merge them based on movieId. My issue is that in the first dataframe, the index is the movieId, while in the second dataframe the movieId is a value. How can I get around this? I just started learning pandas so excuse me if my question is stupid or badly written.