Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c9c0f95

Browse files
author
y-p
committed
BUG: csvwriter writerow() now delegates to pprint_thing() for non-text objects
1 parent a9896a6 commit c9c0f95

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ def __init__(self, f, dialect=csv.excel, encoding="utf-8", **kwds):
932932
self.encoder = codecs.getincrementalencoder(encoding)()
933933

934934
def writerow(self, row):
935-
row = [x if isinstance(x, basestring) else str(x) for x in row]
935+
row = [x if isinstance(x, basestring) else pprint_thing(x) for x in row]
936936
self.writer.writerow([s.encode("utf-8") for s in row])
937937
# Fetch UTF-8 output from the queue ...
938938
data = self.queue.getvalue()

0 commit comments

Comments
 (0)