Skip to content

Commit 69ffb01

Browse files
authored
tostring->tobytes (#33241)
1 parent 9572a2e commit 69ffb01

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/_libs/writers.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def convert_json_to_lines(arr: object) -> str:
112112
if not in_quotes:
113113
num_open_brackets_seen -= 1
114114

115-
return narr.tostring().decode('utf-8')
115+
return narr.tobytes().decode('utf-8')
116116

117117

118118
# stata, pytables

pandas/io/sas/sas.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ cdef class Parser:
431431
elif column_types[j] == column_type_string:
432432
# string
433433
string_chunk[js, current_row] = np.array(source[start:(
434-
start + lngt)]).tostring().rstrip(b"\x00 ")
434+
start + lngt)]).tobytes().rstrip(b"\x00 ")
435435
js += 1
436436

437437
self.current_row_on_page_index += 1

0 commit comments

Comments
 (0)