How can I add a header to a DF without replacing the current one? In other words I just want to shift the current header down and just add it to the dataframe as another rec
The key is to specify header=None and use column to add header:
data = pd.read_csv('file.csv', skiprows=2, header=None ) # skip blank rows if applicable df = pd.DataFrame(data) df = df.iloc[ : , [0,1]] # columns 1 and 2 df.columns = ['A','B'] # title