I have a dataframe (25000, 20000). The original format is like this
I would like to make it become like this
by using python. Can anyone give a help?
Try this; Assuming you wish to have the last column be part of your final data without any column name...
df = pd.DataFrame({"":[1,2,3],
"a":[4,5,6],
"b":[7,8,9]})
a = ""
df.columns = list(df.columns[1:]) + [a]
# Output of df;
a b
0 1 4 7
1 2 5 8
2 3 6 9