How to list the column names along with their index from a data frame in python ?
the below code gives only the index numbers of the column names. But i need to learn on how to list the index numbers along with the column names for a large dataset with multiple columns names.
enter code here:
columnnames=['a','b','c']
df.columns.get_loc(col) for col in  column_names

[df.columns.get_loc(c) for c in df.columns]