From 3081be488f6b639ca6cdad0d1fc2451bfbd0bf09 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 23 Jun 2020 18:15:16 +0200 Subject: [PATCH 1/3] FletcherBaseArray.any() --- fletcher/base.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fletcher/base.py b/fletcher/base.py index 1105464f..67b473b7 100644 --- a/fletcher/base.py +++ b/fletcher/base.py @@ -382,6 +382,13 @@ def all(self, skipna: bool = False) -> Optional[bool]: else: raise TypeError("Can only execute all on boolean arrays") + def any(self, skipna: bool = False) -> Optional[bool]: + """Compute whether any boolean value is True.""" + if pa.types.is_boolean(self.data.type): + return any_op(self.data, skipna=skipna) + else: + raise TypeError("Can only execute all on boolean arrays") + def sum(self, skipna: bool = True): """Return the sum of the values.""" return self._reduce("sum", skipna=skipna) From 92e9974da9fb4aff233bf867b75a16406f4a9439 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 23 Jun 2020 18:17:14 +0200 Subject: [PATCH 2/3] CHANGELOG --- CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 477ab329..ab475892 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ Changelog ========= +0.5.0 +----- + +* Implement `FletcherBaseArray.__or__` and `FletcherBaseArray.__any__` to support `pandas.Series.replace`. + +0.4.0 +----- + +* Forward the `__array__` protocol directly to Arrow +* Add naive implementation for `zfill` +* Add efficient (Numba-based) implementations for `endswith`, `startswith` and `contains` + 0.3.1 ----- From 886ca3152fea06a420b2f3405ca214f3e28b44ac Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 23 Jun 2020 18:22:09 +0200 Subject: [PATCH 3/3] Swallow numpy kwargs --- fletcher/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fletcher/base.py b/fletcher/base.py index 67b473b7..1997db30 100644 --- a/fletcher/base.py +++ b/fletcher/base.py @@ -382,7 +382,7 @@ def all(self, skipna: bool = False) -> Optional[bool]: else: raise TypeError("Can only execute all on boolean arrays") - def any(self, skipna: bool = False) -> Optional[bool]: + def any(self, skipna: bool = False, **kwargs) -> Optional[bool]: """Compute whether any boolean value is True.""" if pa.types.is_boolean(self.data.type): return any_op(self.data, skipna=skipna)