Skip to content

Commit

Permalink
clearer exception message when using index or index_col in read_csv (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
alvaroabascar authored and martindurant committed Mar 29, 2019
1 parent 7782cc4 commit c7d6024
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dask/dataframe/io/csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ def read_pandas(reader, urlpath, blocksize=AUTO_BLOCKSIZE, collection=True,
if include_path_column and isinstance(include_path_column, bool):
include_path_column = 'path'
if 'index' in kwargs or 'index_col' in kwargs:
raise ValueError("Keyword 'index' not supported "
"dd.{0}(...).set_index('my-index') "
raise ValueError("Keywords 'index' and 'index_col' not supported. "
"Use dd.{0}(...).set_index('my-index') "
"instead".format(reader_name))
for kw in ['iterator', 'chunksize']:
if kw in kwargs:
Expand Down

0 comments on commit c7d6024

Please sign in to comment.