Johan Johan - 1 year ago 199
Python Question

Pandas dropna does not work as expected on a MultiIndex

I have a Pandas DataFrame with a multiIndex. The index consists of a date and a text string. Some of the values are NaN and when I use dropna(), the row disappears as expected. However, when I look at the index using df.index, the dropped dates are still there. This is problematic as when I use the to_panel function, the dropped dates reappear.

Am I using dropna incorrectly or how can I resolve this?

Answer Source

I think it is issue 2770.

And solution is decribe here.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download