LoginSignup
5
2

More than 5 years have passed since last update.

pandasのMultiIndexから列に変換する。

Posted at

調べてもでなかった。
indexを列に変換したかった。

indexをresetすると勝手に列が出現する

( ̄◇ ̄;)

df.reset_index(drop=False).head()

マルチインデックスで行抽出

df.loc[pd.IndexSlice[3:4,], :]
5
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
2