I would like to change a specific(using numeric index to choose the column) column name in a pandas dataframe from integer to a string.
But it gives me back: "ValueError: invalid literal for int() with base 10: 'col2'"
import pandas as pd
import numpy as np
arr1=[]
header = ['NA']*6
header[0] = "NAME1"
header = pd.DataFrame(header).transpose()
arr1 = pd.DataFrame(np.arange(36).reshape(6,6))
m1 = pd.concat([header,arr1])
m1.reset_index(drop=True)
print(m1.shape)
print(m1)
##renaming columns:
m1.columns.values[0] = "col2"
How can I do this? thanks