From e25434c9ce0432cb3ea17a4ce18cbce4bf1e9073 Mon Sep 17 00:00:00 2001 From: Flavia Ouyang Date: Wed, 28 Feb 2024 21:56:11 -0500 Subject: [PATCH 1/3] Update drop duplicates documentation to specify method limitation --- pandas/core/frame.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index f530466c0fc30..da354cbfc80dd 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6506,6 +6506,11 @@ def drop_duplicates( DataFrame or None DataFrame with duplicates removed or None if ``inplace=True``. + Notes + ------- + This method requires columns specified by ``subset`` to be of hashable type. + Passing unhashable columns will raise a ``TypeError``. + See Also -------- DataFrame.value_counts: Count unique combinations of columns. From ff54993c390cc883813df06c6589b25ac65ea1ae Mon Sep 17 00:00:00 2001 From: Flavia Ouyang Date: Thu, 29 Feb 2024 12:40:55 -0500 Subject: [PATCH 2/3] Update format --- pandas/core/frame.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index da354cbfc80dd..e05f5e68cca49 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6508,8 +6508,9 @@ def drop_duplicates( Notes ------- - This method requires columns specified by ``subset`` to be of hashable type. - Passing unhashable columns will raise a ``TypeError``. + This method requires columns specified by ``subset`` to be of + hashable type. Passing unhashable columns will raise a + ``TypeError``. See Also -------- From 834615242df5f6dcb069ccda89f31347020dda17 Mon Sep 17 00:00:00 2001 From: Flavia Ouyang Date: Thu, 29 Feb 2024 13:28:18 -0500 Subject: [PATCH 3/3] Revert formatting change --- pandas/core/frame.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index e05f5e68cca49..da354cbfc80dd 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6508,9 +6508,8 @@ def drop_duplicates( Notes ------- - This method requires columns specified by ``subset`` to be of - hashable type. Passing unhashable columns will raise a - ``TypeError``. + This method requires columns specified by ``subset`` to be of hashable type. + Passing unhashable columns will raise a ``TypeError``. See Also --------