Closed
Description
Code Sample, a copy-pastable example if possible
In 0.23 rename_axis
was able to remove the axis name like this:
>>> s = pd.Series([1, 2, 3])
>>> s = s.rename_axis('asdf')
>>> s
asdf
0 1
1 2
2 3
dtype: int64
>>> s.rename_axis(None)
0 1
1 2
2 3
dtype: int64
In 0.24, the mapper
parameter is defaulted to None
so this does not work. The only way to remove an axis label is to use del s.index.name
or s.index.name = None
Problem description
Seems like a regression. I have some code that relies on axis name removal with s.rename_axis(None)
. Seems like there is no clean way to remove an axis name now.
Expected Output
s.rename_axis(None)
should work as it did in 0.23.