diff --git a/asv_bench/benchmarks/groupby.py b/asv_bench/benchmarks/groupby.py index 0725bbeb6c36d..b51b41614bc49 100644 --- a/asv_bench/benchmarks/groupby.py +++ b/asv_bench/benchmarks/groupby.py @@ -142,7 +142,7 @@ def time_frame_nth(self, dtype): def time_series_nth_any(self, dtype): self.df['values'].groupby(self.df['key']).nth(0, dropna='any') - def time_groupby_nth_all(self, dtype): + def time_series_nth_all(self, dtype): self.df['values'].groupby(self.df['key']).nth(0, dropna='all') def time_series_nth(self, dtype): diff --git a/pandas/_libs/internals.pyx b/pandas/_libs/internals.pyx index 2179999859dbb..68698f45d5623 100644 --- a/pandas/_libs/internals.pyx +++ b/pandas/_libs/internals.pyx @@ -390,7 +390,7 @@ def get_blkno_indexers(int64_t[:] blknos, bint group=True): start = 0 cur_blkno = blknos[start] - if group == False: + if group is False: for i in range(1, n): if blknos[i] != cur_blkno: yield cur_blkno, slice(start, i) diff --git a/pandas/core/indexes/period.py b/pandas/core/indexes/period.py index 4d8e57820f29d..c5cb507e729f1 100644 --- a/pandas/core/indexes/period.py +++ b/pandas/core/indexes/period.py @@ -315,7 +315,6 @@ def __contains__(self, key): return True except Exception: return False - return False contains = __contains__