We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 67181ed commit e6fc5beCopy full SHA for e6fc5be
agate/table/from_csv.py
@@ -73,7 +73,7 @@ def from_csv(cls, path, column_names=None, column_types=None, row_names=None, sk
73
# more than the sniff_limit. On my machine, the buffer_size of sys.stdin.buffer is the length of the
74
# input, up to 65536. This assumes that users don't sniff more than 64 KiB.
75
# https://docs.python.org/3/library/io.html#io.BufferedReader.peek
76
- sample = sys.stdin.buffer.peek(sniff_limit).decode(encoding, 'ignore')[:sniff_limit] # reads *bytes*
+ sample = f.buffer.peek(sniff_limit).decode(encoding, 'ignore')[:sniff_limit] # reads *bytes*
77
else:
78
offset = f.tell()
79
sample = f.read(sniff_limit) # reads *characters*
0 commit comments