Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to add header in csv file in python

   from pandas import read_csv

   df = read_csv('test.csv')
   df.columns = ['a', 'b']
   df.to_csv('test_2.csv')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #header #csv #file #python
ADD COMMENT
Topic
Name
2+4 =