@@ -6564,7 +6564,7 @@ def apply(self, func, axis=0, raw=False, result_type=None, args=(), **kwds):
6564
6564
"""
6565
6565
from pandas .core .apply import frame_apply
6566
6566
6567
- #Old apply function, which will be used for each part of DataFrame
6567
+ # Old apply function, which will be used for each part of DataFrame
6568
6568
def partial_apply (dataframe ):
6569
6569
op = frame_apply (
6570
6570
dataframe ,
@@ -6580,7 +6580,7 @@ def partial_apply(dataframe):
6580
6580
def get_dtype (dataframe , column ):
6581
6581
return dataframe .dtypes .values [column ]
6582
6582
6583
- if axis == 0 or axis == ' index' :
6583
+ if axis == 0 or axis == " index" :
6584
6584
if self .shape [1 ] == 0 :
6585
6585
return partial_apply (self )
6586
6586
@@ -6596,10 +6596,13 @@ def get_dtype(dataframe, column):
6596
6596
type = get_dtype (self , i )
6597
6597
j = i + 1
6598
6598
6599
- #While the dtype of column is the same as previous ones, they are handled together
6600
- while j < self .shape [1 ] and pandas .core .dtypes .common .is_dtype_equal (type , get_dtype (self , j )):
6599
+ # While the dtype of column is the same as previous ones,
6600
+ # they are handled together
6601
+ while j < self .shape [1 ] and pandas .core .dtypes .common .is_dtype_equal (
6602
+ type , get_dtype (self , j )
6603
+ ):
6601
6604
j += 1
6602
- frame = self .iloc [:, i : j ]
6605
+ frame = self .iloc [:, i :j ]
6603
6606
i = j
6604
6607
result = partial_apply (frame )
6605
6608
@@ -6619,7 +6622,6 @@ def get_dtype(dataframe, column):
6619
6622
else :
6620
6623
return partial_apply (self )
6621
6624
6622
-
6623
6625
def applymap (self , func ):
6624
6626
"""
6625
6627
Apply a function to a Dataframe elementwise.
0 commit comments