Skip to content

add an __invert__ method to DataFrame #114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions spec/API_specification/dataframe_api/dataframe_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,17 @@ def __divmod__(self, other: DataFrame | Scalar) -> tuple[DataFrame, DataFrame]:
"""
...

def __invert__(self) -> DataFrame:
"""
Invert truthiness of (boolean) elements.

Raises
------
ValueError
If any of the DataFrame's columns is not boolean.
"""
...

def __iter__(self) -> NoReturn:
"""
Iterate over elements.
Expand All @@ -467,12 +478,22 @@ def __iter__(self) -> NoReturn:
def any(self, skipna: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.

Raises
------
ValueError
If any of the DataFrame's columns is not boolean.
"""
...

def all(self, skipna: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.

Raises
------
ValueError
If any of the DataFrame's columns is not boolean.
"""
...

Expand Down