Skip to content

Commit f527136

Browse files
authored
add an __invert__ method to DataFrame (#114)
1 parent 884bd05 commit f527136

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,17 @@ def __divmod__(self, other: DataFrame | Scalar) -> tuple[DataFrame, DataFrame]:
457457
"""
458458
...
459459

460+
def __invert__(self) -> DataFrame:
461+
"""
462+
Invert truthiness of (boolean) elements.
463+
464+
Raises
465+
------
466+
ValueError
467+
If any of the DataFrame's columns is not boolean.
468+
"""
469+
...
470+
460471
def __iter__(self) -> NoReturn:
461472
"""
462473
Iterate over elements.
@@ -472,12 +483,22 @@ def __iter__(self) -> NoReturn:
472483
def any(self, skipna: bool = True) -> DataFrame:
473484
"""
474485
Reduction returns a 1-row DataFrame.
486+
487+
Raises
488+
------
489+
ValueError
490+
If any of the DataFrame's columns is not boolean.
475491
"""
476492
...
477493

478494
def all(self, skipna: bool = True) -> DataFrame:
479495
"""
480496
Reduction returns a 1-row DataFrame.
497+
498+
Raises
499+
------
500+
ValueError
501+
If any of the DataFrame's columns is not boolean.
481502
"""
482503
...
483504

0 commit comments

Comments
 (0)