One way is to use index.levels
:
In [11]: df
Out[11]:
C
A B
0 one 3
1 one 2
2 two 1
In [12]: df.index.levels[1]
Out[12]: Index([one, two], dtype=object)
Related Contents:
- How to avoid Python/Pandas creating an index in a saved csv?
- How to drop a list of rows from Pandas dataframe?
- Convert floats to ints in Pandas?
- Format / Suppress Scientific Notation from Pandas Aggregation Results
- Changing a specific column name in pandas DataFrame [duplicate]
- Replacing column values in a pandas DataFrame
- Delete the first three rows of a dataframe in pandas
- How to print a groupby object
- How to “select distinct” across multiple data frame columns in pandas?
- Pandas cannot open an Excel (.xlsx) file
- how do you filter pandas dataframes by multiple columns
- FutureWarning: elementwise comparison failed; returning scalar, but in the future will perform elementwise comparison
- How to set a cell to NaN in a pandas dataframe
- How to determine whether a column/variable is numeric or not in Pandas/NumPy?
- group by in group by and average
- Read specific columns with pandas or other python module
- Group dataframe and get sum AND count?
- Create Empty Dataframe in Pandas specifying column types
- Setting Different Bar color in matplotlib Python [duplicate]
- Pandas read_csv dtype read all columns but few as string
- Create an empty data frame with index from another data frame
- Is it possible to insert a row at an arbitrary position in a dataframe using pandas?
- Executing an SQL query over a pandas dataset
- How to simply add a column level to a pandas dataframe
- How to get row number in dataframe in Pandas?
- Pandas – Compute z-score for all columns
- Python pandas – filter rows after groupby
- Export a LaTeX table from pandas DataFrame
- Pandas: join DataFrames on field with different names? [duplicate]
- Performant cartesian product (CROSS JOIN) with pandas
- Get total number of hours from a Pandas Timedelta?
- Python pandas: Add a column to my dataframe that counts a variable
- Merge a list of dataframes to create one dataframe [duplicate]
- Pandas sort by group aggregate and column
- Pandas GroupBy and select rows with the minimum value in a specific column
- Different std in pandas vs numpy
- add a row at top in pandas dataframe [duplicate]
- How to create a lagged data structure using pandas dataframe
- Combine pandas DataFrame query() method with isin()
- Edit the width of bars using pd.DataFrame.plot()
- Merge a list of pandas dataframes
- Remove name, dtype from pandas output of dataframe or series
- python dask DataFrame, support for (trivially parallelizable) row apply?
- Convert percent string to float in pandas read_csv
- Equivalent of Paste R to Python
- how to use pandas filter with IQR
- pandas dataframe remove constant column
- python pandas, DF.groupby().agg(), column reference in agg()
- How to deal with warning : “Workbook contains no default style, apply openpyxl’s default “
- vlookup in Pandas using join