I’m trying to combine two dataframes. This is my code:
x = df.loc[df['continent'] == 'South America']
y = df.loc[df['continent'] == 'North America']
Americas =x + y
Americas
When this prints, it just gives back NaN values
>Solution :
By combining, if you meant appending; then try this… means daya y below data x;
Americas = pd.concat([x,y])