Skip to content

BUG: Enforce parse_dates as bool when scalar #12915

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Apr 17, 2016

Title is self-explanatory. Closes #5636.

@jreback jreback added Datetime Datetime data dtype API Design IO CSV read_csv, to_csv labels Apr 17, 2016
@@ -1036,7 +1036,7 @@ def test_parse_dates_string(self):
20090103,c,4,5
"""
rs = self.read_csv(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move all of the parse_dates testing to a separate class (make it a base class, kind of like ParserTests e.g. it inherits from object and have ParserTests inherit from it. Ideally we would group tests like this to keep them together. Can do this in another PR if you want to organize things even more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in any event move the parse_dates tests all together at least.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved what I think are all of the pure parse_dates test together.

@gfyoung gfyoung force-pushed the parse-dates-validate branch 2 times, most recently from 4e793c1 to 24571bd Compare April 18, 2016 15:54
@@ -129,7 +129,7 @@ API changes

- ``Period`` and ``PeriodIndex`` now raises ``IncompatibleFrequency`` error which inherits ``ValueError`` rather than raw ``ValueError`` (:issue:`12615`)


- ``read_csv`` will now raise a ``TypeError`` if ``parse_dates`` is neither a boolean, list, or dictionary (:issue:`5636`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what did it do before?

Copy link
Member Author

@gfyoung gfyoung Apr 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nothing consistent AFAICT.

@jreback jreback added this to the 0.18.1 milestone Apr 18, 2016
@jreback
Copy link
Contributor

jreback commented Apr 18, 2016

ok, lgtm. ping when greeen.

Closes pandas-devgh-5636.

In addition, this commit also adds validation
to ensure that parse_dates is one of bool, list,
or dict.
@gfyoung gfyoung force-pushed the parse-dates-validate branch from 24571bd to 321ec2f Compare April 18, 2016 19:33
@gfyoung
Copy link
Member Author

gfyoung commented Apr 19, 2016

@jreback : Travis finally got the OSX build done, and everything is green! Ready to merge.

@jreback jreback closed this in fe8f8f4 Apr 19, 2016
@gfyoung gfyoung deleted the parse-dates-validate branch April 19, 2016 18:46
gfyoung added a commit to forking-repos/pandas that referenced this pull request Aug 19, 2018
gfyoung added a commit that referenced this pull request Aug 19, 2018
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Datetime Datetime data dtype IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants