@@ -1357,7 +1357,7 @@ def dot(self, other: Series) -> Series:
1357
1357
def dot (self , other : DataFrame | Index | ArrayLike ) -> DataFrame :
1358
1358
...
1359
1359
1360
- def dot (self , other : AnyArrayLike | DataFrame | Series ) -> DataFrame | Series :
1360
+ def dot (self , other : AnyArrayLike | DataFrame ) -> DataFrame | Series :
1361
1361
"""
1362
1362
Compute the matrix multiplication between the DataFrame and other.
1363
1363
@@ -2202,7 +2202,6 @@ def maybe_reorder(
2202
2202
to_remove = [arr_columns .get_loc (col ) for col in arr_exclude ]
2203
2203
arrays = [v for i , v in enumerate (arrays ) if i not in to_remove ]
2204
2204
2205
- arr_columns = arr_columns .drop (arr_exclude )
2206
2205
columns = columns .drop (exclude )
2207
2206
2208
2207
manager = get_option ("mode.data_manager" )
@@ -4437,7 +4436,13 @@ def predicate(arr: ArrayLike) -> bool:
4437
4436
mgr = self ._mgr ._get_data_subset (predicate )
4438
4437
return type (self )(mgr ).__finalize__ (self )
4439
4438
4440
- def insert (self , loc , column , value , allow_duplicates : bool = False ) -> None :
4439
+ def insert (
4440
+ self ,
4441
+ loc : int ,
4442
+ column : Hashable ,
4443
+ value : Scalar | AnyArrayLike ,
4444
+ allow_duplicates : bool = False ,
4445
+ ) -> None :
4441
4446
"""
4442
4447
Insert column into DataFrame at specified location.
4443
4448
@@ -4450,8 +4455,8 @@ def insert(self, loc, column, value, allow_duplicates: bool = False) -> None:
4450
4455
Insertion index. Must verify 0 <= loc <= len(columns).
4451
4456
column : str, number, or hashable object
4452
4457
Label of the inserted column.
4453
- value : int , Series, or array-like
4454
- allow_duplicates : bool, optional
4458
+ value : Scalar , Series, or array-like
4459
+ allow_duplicates : bool, optional default False
4455
4460
4456
4461
See Also
4457
4462
--------
@@ -6633,7 +6638,7 @@ def value_counts(
6633
6638
6634
6639
return counts
6635
6640
6636
- def nlargest (self , n , columns , keep : str = "first" ) -> DataFrame :
6641
+ def nlargest (self , n : int , columns : IndexLabel , keep : str = "first" ) -> DataFrame :
6637
6642
"""
6638
6643
Return the first `n` rows ordered by `columns` in descending order.
6639
6644
@@ -6740,7 +6745,7 @@ def nlargest(self, n, columns, keep: str = "first") -> DataFrame:
6740
6745
"""
6741
6746
return algorithms .SelectNFrame (self , n = n , keep = keep , columns = columns ).nlargest ()
6742
6747
6743
- def nsmallest (self , n , columns , keep : str = "first" ) -> DataFrame :
6748
+ def nsmallest (self , n : int , columns : IndexLabel , keep : str = "first" ) -> DataFrame :
6744
6749
"""
6745
6750
Return the first `n` rows ordered by `columns` in ascending order.
6746
6751
0 commit comments