usecols in Python not reading the headings in my CSV
up vote
0
down vote
favorite
I have a CSV with Headings in row 1, Number and Arrival Date , these are columns 0 and 8 . When I write: cv2 = pd.read_csv(honeyfile, skiprows=[0], header=None, usecols=[0,8]) It works fine. however, I wanted to use a string in case more columns are ever added to the report and shifted the count. I cut and paste the headings in from the CSV to make sure Case and white space were correct. This is my code: cv2 = pd.read_csv(honeyfile, skiprows=[0], header=None, usecols=['Number','Arrival Date']) This returns a ValueError saying there are no matching columns with these names? While the error points to this line, it should be noted that the next line of code renames them, cv2.columns = ['Supply Number','Delivery Date'] This works fine when I use the