I have been working on this code for two days now and i've gotten some good work done, although I just need assistance with this one item.
So my code:
import glob
import pandas as pd
# get data file names
path =r'C:\Users\spkso\Desktop\in'
filenames = glob.glob(path + "/*.csv")
dfs = []
for filename in filenames:
csv=pd.read_csv(filename,header=0)
dfs.append(csv)#,ignore_index=True)
# Concatenate all data into one DataFrame
big_frame = pd.concat(dfs, ignore_index=True)
print (big_frame)
This code when run outputs this:
Quarterback Quarterback Quaterback Rating
0 NaN NaN Andrew Luck 96.5
1 NaN NaN Drew Brees 92.4
2 NaN NaN Tom Brady 95.2
3 NaN Andrew Luck NaN 90.4
4 NaN Drew Brees NaN 95.6
5 NaN Tom Brady NaN 99.8
6 Andrew Luck NaN NaN 101.2
7 Drew Brees NaN NaN 94.6
8 Tom Brady NaN NaN 100.3
It looks okay but I don't want the NaN to be there.
Do any of you guys have any suggestions or fixes