0
我怎麼能代替低於DF的內側索引標籤?熊貓:在多指標數據幀重命名索引標籤若爲NaN
Question profile_gender. Gender
Values Male Female
Question Values
XCS_3. Think of a problem? NaN 25.192318 25.900784
到:
Question profile_gender. Gender
Values Male Female
Question Values
XCS_3. Think of a problem? Okay Done 25.192318 25.900784
我的失敗嘗試:
df.index = df.index.set_levels(['Okay Done'], 1)
不執行任何操作,甚至不拋出一個錯誤代碼
does'df.index.set_levels(['values','Okay Done'],1)'work? – EdChum
不,不取代NaN。有點奇怪。 –
這可能是一個發佈在[github](https://github.com/pydata/pandas/issues) – EdChum