How to get first column name of pandas DataFrame

first_column_name.py
df.columns[0]

will return the name of the first column as str.


Check out similar posts by category: Pandas, Python