Skip to content

Commit 9314fd7

Browse files
authored
API: isnull, isnan, reductions (#96)
* CLN: restore bits lost on multiple merges * API: reductions * API: isnull, isnan
1 parent 05e8681 commit 9314fd7

File tree

1 file changed

+104
-0
lines changed

1 file changed

+104
-0
lines changed

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44

55
if TYPE_CHECKING:
66
from .column_object import Column
7+
from .groupby_object import GroupBy
78

89

910
class DataFrame:
11+
def groupby(self, keys: list[str], /) -> GroupBy:
12+
"""
13+
Group the DataFrame by the given columns.
14+
"""
15+
...
1016

1117
def get_column_by_name(self, name: str, /) -> Column:
1218
"""
@@ -359,5 +365,103 @@ def __divmod__(self, other: DataFrame | "Scalar") -> tuple["DataFrame", "DataFra
359365
Returns
360366
-------
361367
DataFrame
368+
DataFrame
369+
"""
370+
...
371+
372+
def any(self, skipna: bool = True) -> DataFrame:
373+
"""
374+
Reduction returns a 1-row DataFrame.
375+
"""
376+
...
377+
378+
def all(self, skipna: bool = True) -> DataFrame:
379+
"""
380+
Reduction returns a 1-row DataFrame.
381+
"""
382+
...
383+
384+
def min(self, skipna: bool = True) -> DataFrame:
385+
"""
386+
Reduction returns a 1-row DataFrame.
387+
"""
388+
...
389+
390+
def max(self, skipna: bool = True) -> DataFrame:
391+
"""
392+
Reduction returns a 1-row DataFrame.
393+
"""
394+
...
395+
396+
def sum(self, skipna: bool = True) -> DataFrame:
397+
"""
398+
Reduction returns a 1-row DataFrame.
399+
"""
400+
...
401+
402+
def prod(self, skipna: bool = True) -> DataFrame:
403+
"""
404+
Reduction returns a 1-row DataFrame.
405+
"""
406+
...
407+
408+
def median(self, skipna: bool = True) -> DataFrame:
409+
"""
410+
Reduction returns a 1-row DataFrame.
411+
"""
412+
...
413+
414+
def mean(self, skipna: bool = True) -> DataFrame:
415+
"""
416+
Reduction returns a 1-row DataFrame.
417+
"""
418+
...
419+
420+
def std(self, skipna: bool = True) -> DataFrame:
421+
"""
422+
Reduction returns a 1-row DataFrame.
423+
"""
424+
...
425+
426+
def var(self, skipna: bool = True) -> DataFrame:
427+
"""
428+
Reduction returns a 1-row DataFrame.
429+
"""
430+
...
431+
432+
def isnull(self) -> DataFrame:
433+
"""
434+
Check for 'missing' or 'null' entries.
435+
436+
Returns
437+
-------
438+
DataFrame
439+
440+
See also
441+
--------
442+
isnan
443+
444+
Notes
445+
-----
446+
Does *not* include NaN-like entries.
447+
"""
448+
...
449+
450+
def isnan(self) -> DataFrame:
451+
"""
452+
Check for nan-like entries.
453+
454+
Returns
455+
-------
456+
DataFrame
457+
458+
See also
459+
--------
460+
isnull
461+
462+
Notes
463+
-----
464+
Includes anything with NaN-like semantics, e.g. np.datetime64("NaT").
465+
Does *not* include 'missing' or 'null' entries.
362466
"""
363467
...

0 commit comments

Comments
 (0)