return index of column pandas code example
Example 1: set index to column pandas
df = df.set_index('col')
df['col'] = df.index
Example 2: replace column values pandas
df['column'] = df['column'].str.replace(',','-')
df
Example 3: get column number in dataframe pandas
# PANDAS: get column number from colomn name
dataframe.columns.get_loc("<col_name>")