I have a DataFrame which looks like this:
one | two
a | 2 | 5
b | 3 | 6
NaN | 0 | 0
How do I replace the NaN in the index with a string, say "No label"?
I tried:
df = df.replace(np.NaN, "No label")
and
df.index = df.index.replace(np.NaN, "No label")
But got
TypeError: expected string or buffer