python resign headers to a dataframe

description: python pandas rename or change column names

python rename column headers

1
2
3
4
5
6
7
8
9
10
import pandas 
d1 = pandas.DataFrame([[1,2,3]])
# d1
# 0 1 2
# 0 1 2 3

d2 = pandas.DataFrame(d1.values, columns = ['a', 'b', 'c'])
# d2
# a b c
# 0 1 2 3

more on search4fan.github.io