I am reading .csv files and applying a header which is a list of my desired column names.
df=pd.read_csv(myfile,names=header)
If the .csv file has more columns than names in "header" list then the column names are automatically right justified so that the first or left column headers are blank. Is there any way to left justify when applying the header to the DataFrame? Right now what I'm doing is padding the "header" list with blank columns at the end as a workaround like this:
header = ['col1','col2','col3','','',]