pandas.Index.dropna

Index.dropna(self, how='any')[source]

Return Index without NA/NaN values.

Parameters
how{‘any’, ‘all’}, default ‘any’

If the Index is a MultiIndex, drop the value when any or all levels are NaN.

Returns
validIndex