get lenght of a column pandas code example
Example 1: pandas create a column from index
df.reset_index(level=0, inplace=True)
Example 2: get column number in dataframe pandas
# PANDAS: get column number from colomn name
dataframe.columns.get_loc("<col_name>")
Example 3: pd dataframe get column names
lst = data.columns.values # data is dataframe