You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- A :class:`MultiIndex` previously stored the level names as attributes of each of its
133
+
:attr:`MultiIndex.levels`. From Pandas 1.0, the names are only accessed through
134
+
:attr:`MultiIndex.names` (which was also possible previously). This is done in order to
135
+
make :attr:`MultiIndex.levels` more similar to :attr:`CategoricalIndex.categories` (:issue:`27242`:).
136
+
137
+
*pandas 0.25.x*
138
+
139
+
.. code-block:: ipython
140
+
141
+
In [1]: mi = pd.MultiIndex.from_product([[1, 2], ['a', 'b']], names=['x', 'y'])
142
+
Out[2]: mi
143
+
MultiIndex([(1, 'a'),
144
+
(1, 'b'),
145
+
(2, 'a'),
146
+
(2, 'b')],
147
+
names=['x', 'y'])
148
+
Out[3]: mi.levels[0].name
149
+
'x'
150
+
151
+
*pandas 1.0.0*
152
+
153
+
.. ipython:: python
154
+
155
+
mi = pd.MultiIndex.from_product([[1, 2], ['a', 'b']], names=['x', 'y'])
156
+
mi.levels[0].name
157
+
128
158
- :class:`pandas.core.arrays.IntervalArray` adopts a new ``__repr__`` in accordance with other array classes (:issue:`25022`)
129
159
130
160
*pandas 0.25.x*
@@ -150,6 +180,7 @@ Backwards incompatible API changes
150
180
Other API changes
151
181
^^^^^^^^^^^^^^^^^
152
182
183
+
- :class:`pandas.core.groupby.GroupBy.transform` now raises on invalid operation names (:issue:`27489`)
153
184
- :meth:`pandas.api.types.infer_dtype` will now return "integer-na" for integer and ``np.nan`` mix (:issue:`27283`)
154
185
- :meth:`MultiIndex.from_arrays` will no longer infer names from arrays if ``names=None`` is explicitly provided (:issue:`27292`)
155
186
- In order to improve tab-completion, Pandas does not include most deprecated attributes when introspecting a pandas object using ``dir`` (e.g. ``dir(df)``).
0 commit comments