I'm trying to merge two CVS files by column but getting error.
import os
import pandas as pd
os.chdir('/home/yovel/PycharmProjects/fantasyfinal')
a = pd.read_csv("statsmerger.csv")
b = pd.read_csv("team.csv")
b = b.dropna(axis=1)
merged = a.merge(b, on = 'player')
merged.to_csv("output1.csv", index=False)
I expect the new file to fill the empty column in the first column. i'm getting KeyError: 'player'