I have this dataframe:
df1:
year revenues
index
03374312000153 2010 25432
03374312000153 2009 25433
48300560000198 2014 13894
48300560000198 2013 18533
48300560000198 2012 18534
NaN NaN NaN
...
And I have this other dataframe:
df2:
Name Street
index
03374312000153 Yeap Co Locc St
54623827374939 Damn Co Geez St
37273829349299 Woohoo Co Under St
...
I need to select only the rows from df1 on which its index appear on df2.index and merge them, so it would look like this:
year revenues Name Street
index
03374312000153 2010 25432 Yeap Co Locc St
03374312000153 2009 25433 Yeap Co Locc St
...
If I try:
df2=df2.merge(df1,left_index=True,right_index=True)
I get an error:
TypeError: type object argument after * must be a sequence, not map
If I try:
df2=df2.join(df1)
I get the same error as above.
Can someone help?
df.merge(df1,right_index=True,left_index=True,how='inner')work well on my side