Skip to content

BUG: Don't return the same thing twice. #5885

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
wants to merge 1 commit into from

Conversation

jseabold
Copy link
Contributor

@jseabold jseabold commented Jan 8, 2014

Surely this is a typo.

I noticed this because I was going add more robust parsing to datetools.parse [1], and I was surprised to find this function there. Two suggestions / questions. 1) Why not just roll this into the parse function like statsmodels instead of having it fall down on things like "1989Q1"? Extra function seems unneeded to me.

  1. Why return the "resolution"? The parse function doesn't do this, and I'd expect them to have the same return signature. Optionally, the parse function should also try to infer a frequency.

[1] https://github.com/statsmodels/statsmodels/blob/master/statsmodels/tsa/base/datetools.py#L117

@jseabold jseabold closed this Jan 8, 2014
@jseabold jseabold mentioned this pull request Jan 8, 2014
3 tasks
@jreback
Copy link
Contributor

jreback commented Jan 8, 2014

FYI, this is used mostly for interpreting times AFAIK

I think @wesm wanted to allow replaceable date parsers at one point, so was written generally..

datetools.parse is not hit really all that much except in case of an exceptional string

@jseabold jseabold deleted the return-typo branch January 8, 2014 21:28
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.

2 participants