get columns of dataframe 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: pd dataframe get column names
lst = data.columns.values # data is dataframe
Example 3: how to find columns of a dataframe
list(my_dataframe.columns.values)
Example 4: get column pandas
column = df["column_name"]