From 30d7ae1175cf1c50c39a153d71375b1737296714 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Thu, 31 Jan 2019 11:13:45 -0600 Subject: [PATCH 1/2] clarified the documentation for DF.drop_duplicates I hit an issue with a time series index where I wanted to keep duplicate data with different time values and only delete rows with the same time and columns. This documentation change would have saved me a lot of time. --- pandas/core/frame.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 78c9f2aa96472..2cd1ee9a8d3ba 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4625,7 +4625,8 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None, def drop_duplicates(self, subset=None, keep='first', inplace=False): """ Return DataFrame with duplicate rows removed, optionally only - considering certain columns. + considering certain columns. Indexes, including time indexes + are ignored. Parameters ---------- From a1dbe83c56e8ecec2538000c90e994a6959eac76 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Fri, 1 Feb 2019 11:43:04 -0600 Subject: [PATCH 2/2] remove trailing whitespace --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 2cd1ee9a8d3ba..ade05ab27093e 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -4625,7 +4625,7 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None, def drop_duplicates(self, subset=None, keep='first', inplace=False): """ Return DataFrame with duplicate rows removed, optionally only - considering certain columns. Indexes, including time indexes + considering certain columns. Indexes, including time indexes are ignored. Parameters