Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

create dataframe from csv and name columns pandas

# create list and enter header values 
header_list = ["Val1", "Val2", "Val3"]
# create a dataframe ex: df and tell pandas to read in your csv
# in same line assign your list to the names=
df = pd.read_csv("sample_file.csv", names=header_list)
Source by www.kite.com #
 
PREVIOUS NEXT
Tagged: #create #dataframe #csv #columns #pandas
ADD COMMENT
Topic
Name
8+1 =