File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -267,8 +267,8 @@ def encode_func(x):
267267 if x is str :
268268 return x .encode (encoding = encoding , errors = errors )
269269 else :
270- # Manage AttributeError: 'pyarrow.lib.LargeStringScalar'
271- # object has no attribute 'encode'
270+ # If x is a 'pyarrow.lib.LargeStringScalar' it has
271+ # no attribute 'encode' so we cast it
272272 return str (x ).encode (encoding = encoding , errors = errors )
273273
274274 return self ._str_map (encode_func , dtype = object )
Original file line number Diff line number Diff line change @@ -566,8 +566,8 @@ def encode_func(x):
566566 if x is str :
567567 return x .encode ("cp1252" , "ignore" )
568568 else :
569- # Manage AttributeError: 'pyarrow.lib.LargeStringScalar'
570- # object has no attribute 'encode'
569+ # If x is a 'pyarrow.lib.LargeStringScalar' it has
570+ # no attribute 'encode' so we cast it
571571 return str (x ).encode ("cp1252" , "ignore" )
572572
573573 expected = ser .map (encode_func ).astype ("object" )
You can’t perform that action at this time.
0 commit comments