Skip to content

Error nicely on parse dates failure in read_csv#2863

Merged
jcrist merged 1 commit intodask:masterfrom
jcrist:error-on-parse-dates-failure
Nov 7, 2017
Merged

Error nicely on parse dates failure in read_csv#2863
jcrist merged 1 commit intodask:masterfrom
jcrist:error-on-parse-dates-failure

Conversation

@jcrist
Copy link
Copy Markdown
Member

@jcrist jcrist commented Nov 3, 2017

In pandas, if a column specified in parse_dates has an invalid value,
the column is silently converted to object dtype. This can cause
issues if some columns infer as datetimes and others as object dtype, as
converting with astype is prone to failure.

To remedy this, we add a nice error message if any partition expecting a
datetime dtype finds an object dtype instead.

Fixes #2845.

In pandas, if a column specified in `parse_dates` has an invalid value,
the column is silently converted to `object` dtype. This can cause
issues if some columns infer as datetimes and others as object dtype, as
converting with `astype` is prone to failure.

To remedy this, we add a nice error message if any partition expecting a
datetime dtype finds an object dtype instead.
@jcrist
Copy link
Copy Markdown
Member Author

jcrist commented Nov 6, 2017

Planning on merging tonight if no comment.

@jcrist jcrist merged commit dcbd628 into dask:master Nov 7, 2017
@jcrist jcrist deleted the error-on-parse-dates-failure branch November 7, 2017 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant