How to get first column name of pandas DataFrame
df.columns[0]
will return the name of the first column asĀ str
.
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow