how to transform an index in a column dataframe python code example
Example 1: pandas slice based on column value
df.loc[df['column_name'] == some_value]
Example 2: pandas create a column from index
df.reset_index(level=0, inplace=True)
Example 3: how to get a row of a dataframe with subset columns in python
df.iloc[1:3, 5:7]