October 2019
Beginner to intermediate
674 pages
16h 43m
English
The following code will specify the column names for a dataset:
column_names=pd.read_csv('Customer Churn Columns.csv')column_names_list=column_names['Column Names'].tolist()data=pd.read_csv('Customer Churn Model.txt',header=None,names=column_names_list)
Note that the column names are read from a file and then converted into a list to be passed to the names parameter in read_csv.
Read now
Unlock full access