Skip to content

Commit

Permalink
Don't check length of sample if it is a boolean.
Browse files Browse the repository at this point in the history
  • Loading branch information
ian-r-rose committed Apr 2, 2019
1 parent e2fad08 commit 6f8e62d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dask/dataframe/io/csv.py
Expand Up @@ -371,7 +371,7 @@ def read_pandas(reader, urlpath, blocksize=AUTO_BLOCKSIZE, collection=True,
# If the last partition is empty, don't count it
nparts = 0 if not parts else len(parts) - int(not parts[-1])

if nparts < lastskiprow + need and len(b_sample) >= sample:
if sample is not False and nparts < lastskiprow + need and len(b_sample) >= sample:
raise ValueError("Sample is not large enough to include at least one "
"row of data. Please increase the number of bytes "
"in `sample` in the call to `read_csv`/`read_table`")
Expand Down

0 comments on commit 6f8e62d

Please sign in to comment.