@@ -19,6 +19,11 @@ def dataframe(self) -> object:
19
19
If a library only implements the Standard, then this can return `self`.
20
20
"""
21
21
...
22
+
23
+ def shape (self ) -> tuple [int , int ]:
24
+ """
25
+ Return number of rows and number of columns.
26
+ """
22
27
23
28
def groupby (self , keys : Sequence [str ], / ) -> GroupBy :
24
29
"""
@@ -174,21 +179,6 @@ def drop_column(self, label: str) -> DataFrame:
174
179
"""
175
180
...
176
181
177
- def set_column (self , label : str , value : Column ) -> DataFrame :
178
- """
179
- Add or replace a column.
180
-
181
- Parameters
182
- ----------
183
- label : str
184
- value : Column
185
-
186
- Returns
187
- -------
188
- DataFrame
189
- """
190
- ...
191
-
192
182
def rename_columns (self , mapping : Mapping [str , str ]) -> DataFrame :
193
183
"""
194
184
Rename columns.
@@ -452,6 +442,17 @@ def __divmod__(self, other: DataFrame | Scalar) -> tuple[DataFrame, DataFrame]:
452
442
"""
453
443
...
454
444
445
+ def __invert__ (self ) -> DataFrame :
446
+ """
447
+ Invert truthiness of (boolean) elements.
448
+
449
+ Raises
450
+ ------
451
+ ValueError
452
+ If any of the DataFrame's columns is not boolean.
453
+ """
454
+ ...
455
+
455
456
def __iter__ (self ) -> NoReturn :
456
457
"""
457
458
Iterate over elements.
@@ -467,12 +468,50 @@ def __iter__(self) -> NoReturn:
467
468
def any (self , skipna : bool = True ) -> DataFrame :
468
469
"""
469
470
Reduction returns a 1-row DataFrame.
471
+
472
+ Raises
473
+ ------
474
+ ValueError
475
+ If any of the DataFrame's columns is not boolean.
470
476
"""
471
477
...
472
478
473
479
def all (self , skipna : bool = True ) -> DataFrame :
474
480
"""
475
481
Reduction returns a 1-row DataFrame.
482
+
483
+ Raises
484
+ ------
485
+ ValueError
486
+ If any of the DataFrame's columns is not boolean.
487
+ """
488
+ ...
489
+
490
+ def any_rowwise (self , skipna : bool = True ) -> Column :
491
+ """
492
+ Reduction returns a Column.
493
+
494
+ Differs from ``DataFrame.any`` and that the reduction happens
495
+ for each row, rather than for each column.
496
+
497
+ Raises
498
+ ------
499
+ ValueError
500
+ If any of the DataFrame's columns is not boolean.
501
+ """
502
+ ...
503
+
504
+ def all_rowwise (self , skipna : bool = True ) -> Column :
505
+ """
506
+ Reduction returns a Column.
507
+
508
+ Differs from ``DataFrame.all`` and that the reduction happens
509
+ for each row, rather than for each column.
510
+
511
+ Raises
512
+ ------
513
+ ValueError
514
+ If any of the DataFrame's columns is not boolean.
476
515
"""
477
516
...
478
517
0 commit comments