Edit: perhaps the following applies only to MultiIndex s and, in any case, df.index.isnull() with the new df.index.isnull() function (see other answers). I will leave this answer only for historical interest.
For people who are coming to this now, you can do it directly without rethinking, relying on the fact that the NaNs in the index will be represented by -1 . So:
df = dfA[dfA.index.labels!=-1]
Even better, in Pandas> 0.16.1, you can use drop () to do this in place without copying:
dfA.drop(labels=[-1], level='index', inplace=True)
NB: This is a little misleading that the index level is called an “index”: it will usually be something more specific to use, such as “date” or “experimental_run”.
source share