create dataframe from csv and name columns pandas

Solutions on MaxInterview for create dataframe from csv and name columns pandas by the best coders in the world

showing results for - "create dataframe from csv and name columns pandas"
Jaden
18 Feb 2017
1# create list and enter header values 
2header_list = ["Val1", "Val2", "Val3"]
3# create a dataframe ex: df and tell pandas to read in your csv
4# in same line assign your list to the names=
5df = pd.read_csv("sample_file.csv", names=header_list)