@@ -590,6 +590,7 @@ def _get_cleaned_column_resolvers(self) -> dict[Hashable, Series]:
590
590
clean_column_name (k ): v for k , v in self .items () if not isinstance (k , int )
591
591
}
592
592
593
+ @final
593
594
@property
594
595
def _info_axis (self ) -> Index :
595
596
return getattr (self , self ._info_axis_name )
@@ -969,6 +970,7 @@ def squeeze(self, axis: Axis | None = None):
969
970
# ----------------------------------------------------------------------
970
971
# Rename
971
972
973
+ @final
972
974
def _rename (
973
975
self ,
974
976
mapper : Renamer | None = None ,
@@ -3476,6 +3478,7 @@ def _wrap(x, alt_format_):
3476
3478
render_kwargs = render_kwargs_ ,
3477
3479
)
3478
3480
3481
+ @final
3479
3482
def _to_latex_via_styler (
3480
3483
self ,
3481
3484
buf = None ,
@@ -4293,6 +4296,7 @@ def _check_setitem_copy(self, t: str = "setting", force: bool_t = False):
4293
4296
if value == "warn" :
4294
4297
warnings .warn (t , SettingWithCopyWarning , stacklevel = find_stack_level ())
4295
4298
4299
+ @final
4296
4300
def __delitem__ (self , key ) -> None :
4297
4301
"""
4298
4302
Delete item
@@ -6069,6 +6073,7 @@ def __finalize__(self, other, method: str | None = None, **kwargs) -> Self:
6069
6073
6070
6074
return self
6071
6075
6076
+ @final
6072
6077
def __getattr__ (self , name : str ):
6073
6078
"""
6074
6079
After regular attribute access, try looking up the name
@@ -6085,6 +6090,7 @@ def __getattr__(self, name: str):
6085
6090
return self [name ]
6086
6091
return object .__getattribute__ (self , name )
6087
6092
6093
+ @final
6088
6094
def __setattr__ (self , name : str , value ) -> None :
6089
6095
"""
6090
6096
After regular attribute access, try setting the name
@@ -6255,6 +6261,7 @@ def dtypes(self):
6255
6261
data = self ._mgr .get_dtypes ()
6256
6262
return self ._constructor_sliced (data , index = self ._info_axis , dtype = np .object_ )
6257
6263
6264
+ @final
6258
6265
def astype (
6259
6266
self , dtype , copy : bool_t | None = None , errors : IgnoreRaise = "raise"
6260
6267
) -> Self :
@@ -7128,6 +7135,7 @@ def ffill(
7128
7135
) -> Self | None :
7129
7136
...
7130
7137
7138
+ @final
7131
7139
@doc (klass = _shared_doc_kwargs ["klass" ])
7132
7140
def ffill (
7133
7141
self ,
@@ -7149,6 +7157,7 @@ def ffill(
7149
7157
method = "ffill" , axis = axis , inplace = inplace , limit = limit , downcast = downcast
7150
7158
)
7151
7159
7160
+ @final
7152
7161
@doc (klass = _shared_doc_kwargs ["klass" ])
7153
7162
def pad (
7154
7163
self ,
@@ -7211,6 +7220,7 @@ def bfill(
7211
7220
) -> Self | None :
7212
7221
...
7213
7222
7223
+ @final
7214
7224
@doc (klass = _shared_doc_kwargs ["klass" ])
7215
7225
def bfill (
7216
7226
self ,
@@ -7232,6 +7242,7 @@ def bfill(
7232
7242
method = "bfill" , axis = axis , inplace = inplace , limit = limit , downcast = downcast
7233
7243
)
7234
7244
7245
+ @final
7235
7246
@doc (klass = _shared_doc_kwargs ["klass" ])
7236
7247
def backfill (
7237
7248
self ,
@@ -7501,6 +7512,7 @@ def replace(
7501
7512
else :
7502
7513
return result .__finalize__ (self , method = "replace" )
7503
7514
7515
+ @final
7504
7516
def interpolate (
7505
7517
self ,
7506
7518
method : Literal [
@@ -8185,6 +8197,7 @@ def _clip_with_one_bound(self, threshold, method, axis, inplace):
8185
8197
# GH 40420
8186
8198
return self .where (subset , threshold , axis = axis , inplace = inplace )
8187
8199
8200
+ @final
8188
8201
def clip (
8189
8202
self ,
8190
8203
lower = None ,
@@ -9996,6 +10009,7 @@ def where(
9996
10009
) -> Self | None :
9997
10010
...
9998
10011
10012
+ @final
9999
10013
@doc (
10000
10014
klass = _shared_doc_kwargs ["klass" ],
10001
10015
cond = "True" ,
@@ -10188,6 +10202,7 @@ def mask(
10188
10202
) -> Self | None :
10189
10203
...
10190
10204
10205
+ @final
10191
10206
@doc (
10192
10207
where ,
10193
10208
klass = _shared_doc_kwargs ["klass" ],
@@ -10368,6 +10383,7 @@ def shift(
10368
10383
result = self .set_axis (new_ax , axis = axis )
10369
10384
return result .__finalize__ (self , method = "shift" )
10370
10385
10386
+ @final
10371
10387
def truncate (
10372
10388
self ,
10373
10389
before = None ,
@@ -11693,46 +11709,56 @@ def _inplace_method(self, other, op) -> Self:
11693
11709
)
11694
11710
return self
11695
11711
11712
+ @final
11696
11713
def __iadd__ (self , other ) -> Self :
11697
11714
# error: Unsupported left operand type for + ("Type[NDFrame]")
11698
11715
return self ._inplace_method (other , type (self ).__add__ ) # type: ignore[operator]
11699
11716
11717
+ @final
11700
11718
def __isub__ (self , other ) -> Self :
11701
11719
# error: Unsupported left operand type for - ("Type[NDFrame]")
11702
11720
return self ._inplace_method (other , type (self ).__sub__ ) # type: ignore[operator]
11703
11721
11722
+ @final
11704
11723
def __imul__ (self , other ) -> Self :
11705
11724
# error: Unsupported left operand type for * ("Type[NDFrame]")
11706
11725
return self ._inplace_method (other , type (self ).__mul__ ) # type: ignore[operator]
11707
11726
11727
+ @final
11708
11728
def __itruediv__ (self , other ) -> Self :
11709
11729
# error: Unsupported left operand type for / ("Type[NDFrame]")
11710
11730
return self ._inplace_method (
11711
11731
other , type (self ).__truediv__ # type: ignore[operator]
11712
11732
)
11713
11733
11734
+ @final
11714
11735
def __ifloordiv__ (self , other ) -> Self :
11715
11736
# error: Unsupported left operand type for // ("Type[NDFrame]")
11716
11737
return self ._inplace_method (
11717
11738
other , type (self ).__floordiv__ # type: ignore[operator]
11718
11739
)
11719
11740
11741
+ @final
11720
11742
def __imod__ (self , other ) -> Self :
11721
11743
# error: Unsupported left operand type for % ("Type[NDFrame]")
11722
11744
return self ._inplace_method (other , type (self ).__mod__ ) # type: ignore[operator]
11723
11745
11746
+ @final
11724
11747
def __ipow__ (self , other ) -> Self :
11725
11748
# error: Unsupported left operand type for ** ("Type[NDFrame]")
11726
11749
return self ._inplace_method (other , type (self ).__pow__ ) # type: ignore[operator]
11727
11750
11751
+ @final
11728
11752
def __iand__ (self , other ) -> Self :
11729
11753
# error: Unsupported left operand type for & ("Type[NDFrame]")
11730
11754
return self ._inplace_method (other , type (self ).__and__ ) # type: ignore[operator]
11731
11755
11756
+ @final
11732
11757
def __ior__ (self , other ) -> Self :
11733
11758
# error: Unsupported left operand type for | ("Type[NDFrame]")
11734
11759
return self ._inplace_method (other , type (self ).__or__ ) # type: ignore[operator]
11735
11760
11761
+ @final
11736
11762
def __ixor__ (self , other ) -> Self :
11737
11763
# error: Unsupported left operand type for ^ ("Type[NDFrame]")
11738
11764
return self ._inplace_method (other , type (self ).__xor__ ) # type: ignore[operator]
0 commit comments