Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Multi-Index

pd.MultiIndex.from_product([[jj.index.name], jj.index.values])

Get Levels

get_level_values
it seems to me that there are even easier ways sometimes ...

Extract columns whose 2nd-level index is bi from the data frame df.

df.loc(axis=1)[:, "bi"]