get columns by name pandas code example
Example 1: get column number in dataframe pandas
# PANDAS: get column number from colomn name
dataframe.columns.get_loc("<col_name>")
Example 2: python pandas return column name of a specific column
# Basic syntax:
list(df.columns)[column_number]
# This returns the column name of the column of interest