Skip to content

Commit

Permalink
make skip_nulls keyword-only where possible (#161)
Browse files Browse the repository at this point in the history
Co-authored-by: MarcoGorelli <>
  • Loading branch information
MarcoGorelli committed May 3, 2023
1 parent 7059081 commit 8268072
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 32 deletions.
20 changes: 10 additions & 10 deletions spec/API_specification/dataframe_api/column_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def __invert__(self) -> Column:
If any of the Column's columns is not boolean.
"""

def any(self, skip_nulls: bool = True) -> bool:
def any(self, *, skip_nulls: bool = True) -> bool:
"""
Reduction returns a bool.
Expand All @@ -280,7 +280,7 @@ def any(self, skip_nulls: bool = True) -> bool:
If column is not boolean.
"""

def all(self, skip_nulls: bool = True) -> bool:
def all(self, *, skip_nulls: bool = True) -> bool:
"""
Reduction returns a bool.
Expand All @@ -290,56 +290,56 @@ def all(self, skip_nulls: bool = True) -> bool:
If column is not boolean.
"""

def min(self, skip_nulls: bool = True) -> dtype:
def min(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Any data type that supports comparisons
must be supported. The returned value has the same dtype as the column.
"""

def max(self, skip_nulls: bool = True) -> dtype:
def max(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Any data type that supports comparisons
must be supported. The returned value has the same dtype as the column.
"""

def sum(self, skip_nulls: bool = True) -> dtype:
def sum(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Must be supported for numerical and
datetime data types. The returned value has the same dtype as the
column.
"""

def prod(self, skip_nulls: bool = True) -> dtype:
def prod(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Must be supported for numerical data types.
The returned value has the same dtype as the column.
"""

def median(self, skip_nulls: bool = True) -> dtype:
def median(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Must be supported for numerical and
datetime data types. Returns a float for numerical data types, and
datetime (with the appropriate timedelta format string) for datetime
dtypes.
"""

def mean(self, skip_nulls: bool = True) -> dtype:
def mean(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Must be supported for numerical and
datetime data types. Returns a float for numerical data types, and
datetime (with the appropriate timedelta format string) for datetime
dtypes.
"""

def std(self, skip_nulls: bool = True) -> dtype:
def std(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Must be supported for numerical and
datetime data types. Returns a float for numerical data types, and
datetime (with the appropriate timedelta format string) for datetime
dtypes.
"""

def var(self, skip_nulls: bool = True) -> dtype:
def var(self, *, skip_nulls: bool = True) -> dtype:
"""
Reduction returns a scalar. Must be supported for numerical and
datetime data types. Returns a float for numerical data types, and
Expand Down
24 changes: 12 additions & 12 deletions spec/API_specification/dataframe_api/dataframe_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def __iter__(self) -> NoReturn:
"""
raise NotImplementedError("'__iter__' is intentionally not implemented.")

def any(self, skip_nulls: bool = True) -> DataFrame:
def any(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
Expand All @@ -554,7 +554,7 @@ def any(self, skip_nulls: bool = True) -> DataFrame:
"""
...

def all(self, skip_nulls: bool = True) -> DataFrame:
def all(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
Expand All @@ -565,7 +565,7 @@ def all(self, skip_nulls: bool = True) -> DataFrame:
"""
...

def any_rowwise(self, skip_nulls: bool = True) -> Column:
def any_rowwise(self, *, skip_nulls: bool = True) -> Column:
"""
Reduction returns a Column.
Expand All @@ -579,7 +579,7 @@ def any_rowwise(self, skip_nulls: bool = True) -> Column:
"""
...

def all_rowwise(self, skip_nulls: bool = True) -> Column:
def all_rowwise(self, *, skip_nulls: bool = True) -> Column:
"""
Reduction returns a Column.
Expand All @@ -593,49 +593,49 @@ def all_rowwise(self, skip_nulls: bool = True) -> Column:
"""
...

def min(self, skip_nulls: bool = True) -> DataFrame:
def min(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
...

def max(self, skip_nulls: bool = True) -> DataFrame:
def max(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
...

def sum(self, skip_nulls: bool = True) -> DataFrame:
def sum(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
...

def prod(self, skip_nulls: bool = True) -> DataFrame:
def prod(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
...

def median(self, skip_nulls: bool = True) -> DataFrame:
def median(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
...

def mean(self, skip_nulls: bool = True) -> DataFrame:
def mean(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
...

def std(self, skip_nulls: bool = True) -> DataFrame:
def std(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
...

def var(self, skip_nulls: bool = True) -> DataFrame:
def var(self, *, skip_nulls: bool = True) -> DataFrame:
"""
Reduction returns a 1-row DataFrame.
"""
Expand Down
20 changes: 10 additions & 10 deletions spec/API_specification/dataframe_api/groupby_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,34 @@ class GroupBy:
**Methods**
"""
def any(self, skip_nulls: bool = True) -> "DataFrame":
def any(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def all(self, skip_nulls: bool = True) -> "DataFrame":
def all(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def min(self, skip_nulls: bool = True) -> "DataFrame":
def min(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def max(self, skip_nulls: bool = True) -> "DataFrame":
def max(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def sum(self, skip_nulls: bool = True) -> "DataFrame":
def sum(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def prod(self, skip_nulls: bool = True) -> "DataFrame":
def prod(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def median(self, skip_nulls: bool = True) -> "DataFrame":
def median(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def mean(self, skip_nulls: bool = True) -> "DataFrame":
def mean(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def std(self, skip_nulls: bool = True) -> "DataFrame":
def std(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def var(self, skip_nulls: bool = True) -> "DataFrame":
def var(self, *, skip_nulls: bool = True) -> "DataFrame":
...

def size(self) -> "DataFrame":
Expand Down

0 comments on commit 8268072

Please sign in to comment.