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
BUG: Hash and compare tuple subclasses as builtin tuples (#59286)
* cast all tuple subclass index keys to tuple
* fix docs typo
* add multi-index namedtuple test
* hash and compare all tuple subclasses as tuples
* test hashtable with namedtuples
* remove redundant index key conversion
* add comments
* update whatsnew
* check key error message
* fix whatsnew section
* test namedtuple and tuple interchangeable in hashtable
* Update doc/source/whatsnew/v3.0.0.rst
Co-authored-by: Matthew Roeschke <[email protected]>
* use pytest.raises regexp instead of str eq
---------
Co-authored-by: Matthew Roeschke <[email protected]>
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v3.0.0.rst
+2
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,7 @@ Other enhancements
33
33
- :func:`DataFrame.to_excel` now raises an ``UserWarning`` when the character count in a cell exceeds Excel's limitation of 32767 characters (:issue:`56954`)
34
34
- :func:`read_stata` now returns ``datetime64`` resolutions better matching those natively stored in the stata format (:issue:`55642`)
35
35
- :meth:`DataFrame.agg` called with ``axis=1`` and a ``func`` which relabels the result index now raises a ``NotImplementedError`` (:issue:`58807`).
36
+
- :meth:`Index.get_loc` now accepts also subclasses of ``tuple`` as keys (:issue:`57922`)
36
37
- :meth:`Styler.set_tooltips` provides alternative method to storing tooltips by using title attribute of td elements. (:issue:`56981`)
37
38
- Allow dictionaries to be passed to :meth:`pandas.Series.str.replace` via ``pat`` parameter (:issue:`51748`)
38
39
- Support passing a :class:`Series` input to :func:`json_normalize` that retains the :class:`Series` :class:`Index` (:issue:`51452`)
@@ -231,6 +232,7 @@ Other API changes
231
232
^^^^^^^^^^^^^^^^^
232
233
- 3rd party ``py.path`` objects are no longer explicitly supported in IO methods. Use :py:class:`pathlib.Path` objects instead (:issue:`57091`)
233
234
- :func:`read_table`'s ``parse_dates`` argument defaults to ``None`` to improve consistency with :func:`read_csv` (:issue:`57476`)
235
+
- All classes inheriting from builtin ``tuple`` (including types created with :func:`collections.namedtuple`) are now hashed and compared as builtin ``tuple`` during indexing operations (:issue:`57922`)
234
236
- Made ``dtype`` a required argument in :meth:`ExtensionArray._from_sequence_of_strings` (:issue:`56519`)
235
237
- Passing a :class:`Series` input to :func:`json_normalize` will now retain the :class:`Series` :class:`Index`, previously output had a new :class:`RangeIndex` (:issue:`51452`)
236
238
- Updated :meth:`DataFrame.to_excel` so that the output spreadsheet has no styling. Custom styling can still be done using :meth:`Styler.to_excel` (:issue:`54154`)
0 commit comments