Skip to content

Commit 4967f14

Browse files
author
Veronur
committed
test for issue-pandas-dev#34529
1 parent a5b37ba commit 4967f14

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/frame/test_apply.py

+7
Original file line numberDiff line numberDiff line change
@@ -785,6 +785,13 @@ def non_reducing_function(val):
785785
df.applymap(func)
786786
assert values == df.a.to_list()
787787

788+
def test_apply_with_byte_string(self):
789+
#GH-34529
790+
try:
791+
df = pd.DataFrame(np.array([b'abcd', b'efgh']), columns=['col'])
792+
df.apply(lambda x: x.astype('object'))
793+
except OSError as err:
794+
tm.external_error_raised(a)
788795

789796
class TestInferOutputShape:
790797
# the user has supplied an opaque UDF where

0 commit comments

Comments
 (0)