Skip to content

FAIL: test_get_multi2 (pandas.io.tests.test_data.TestGoogle) #4357

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
nickray opened this issue Jul 25, 2013 · 23 comments
Closed

FAIL: test_get_multi2 (pandas.io.tests.test_data.TestGoogle) #4357

nickray opened this issue Jul 25, 2013 · 23 comments
Labels
IO Data IO issues that don't fit into a more specific label Testing pandas testing functions or related to the test suite Unreliable Test Unit tests that occasionally fail
Milestone

Comments

@nickray
Copy link

nickray commented Jul 25, 2013

pan = web.get_data_google(['GE', 'MSFT', 'INTC'], 'JAN-01-12', 'JAN-31-12')
result = pan.Open.ix['Jan-15-12':'Jan-20-12']

has shape (5, 3), not (4, 3) as claimed in the test:

               GE   INTC   MSFT
Date                          
2012-01-16  17.65    NaN    NaN
2012-01-17  17.85  25.18  28.40
2012-01-18  17.55  25.13  28.31
2012-01-19  17.60  25.52  28.16
2012-01-20  17.60  25.87  28.82
@cpcloud
Copy link
Member

cpcloud commented Jul 25, 2013

do you get this failure consistently? this will be fixed in 0.13, these tests need a little tlc

@nickray
Copy link
Author

nickray commented Jul 25, 2013

Yes.

In any case, a week has business days, why would shape[0] be 4 and not 5?

@jreback
Copy link
Contributor

jreback commented Jul 25, 2013

1/16 is MLK day (not a trading day)...prob bad test

@nickray
Copy link
Author

nickray commented Jul 25, 2013

Yes, but many assets trade on "non-trading days", and Google is obviously returning quotes for GE.
I find it hard to believe that Jan 2012 data is inconsistent... Why is code released with tests that fail?

@cpcloud
Copy link
Member

cpcloud commented Jul 25, 2013

I find it hard to believe that Jan 2012 data is inconsistent

Here's what I get when I run the two lines you've pasted above

In [14]: paste
pan = web.get_data_google(['GE', 'MSFT', 'INTC'], 'JAN-01-12', 'JAN-31-12')
result = pan.Open.ix['Jan-15-12':'Jan-20-12']

## -- End pasted text --

In [15]: result
Out[15]:
               GE   INTC   MSFT
Date
2012-01-17  18.99  25.18  28.40
2012-01-18  18.58  25.13  28.31
2012-01-19  19.03  25.52  28.16
2012-01-20  18.81  25.87  28.82

Call me crazy, but that looks pretty inconsistent to me.

@nickray
Copy link
Author

nickray commented Jul 25, 2013

Calls you crazy ;-)

Well I'm at a loss. Their homepage lists no prices for GE on MLK: http://is.gd/tS7gsC
And I (consistently... g) get a quote of 17.65

The problem is that some people package software in a way that breaks when tests do not pass:
https://aur.archlinux.org/packages/python2-pandas/

So flaky tests like these should probably not be included.

I do still wonder where this inconsistency is coming from?

@jreback
Copy link
Contributor

jreback commented Jul 25, 2013

can you post:
python, numpy versions, os?

@nickray
Copy link
Author

nickray commented Jul 25, 2013

Python 2.7.5, IPython 0.13.2, numpy 1.7.1, up-to-date Arch Linux.

I was actually running an Intel MKL-enabled version of numpy 1.7.1, but replacing it with the stock distro package doesn't change the query result.

@cpcloud
Copy link
Member

cpcloud commented Jul 25, 2013

@nickray also are you using master?

i have an almost identical setup, i use arch too

you can easily get this info via the ci/print_versions.py script from the pandas dir

@nickray
Copy link
Author

nickray commented Jul 25, 2013

The AUR PKGBUILD is fetching http://pypi.python.org/packages/source/p/pandas/pandas-0.12.0.tar.gz, which I assume is the official release?

Or what do you mean with master?

@cpcloud
Copy link
Member

cpcloud commented Jul 25, 2013

@nickray release is fine

@nickray
Copy link
Author

nickray commented Jul 25, 2013

It was suggested on https://aur.archlinux.org/packages/python2-pandas/ that this might be a locale issue.

However, running in an empty "env" doesn't help.
Also the pre-built version by continuum.io returns the same shape (5, 3).

@cpcloud
Copy link
Member

cpcloud commented Jul 25, 2013

@nickray What do you mean an empty env? Here's the output of locale for me:

LANG=en_US.UTF-8
LC_CTYPE=en_US.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

continuum.io should respect locale settings and if that's the issue then it won't matter which version of pandas you use

what is your locale? i'll try to repro using your locale

@nickray
Copy link
Author

nickray commented Jul 25, 2013

My locale is exactly the same. By empty env I mean "env -i /bin/sh" and then starting python from that.

@jreback
Copy link
Contributor

jreback commented Jul 25, 2013

@nickray did you happen to do your call before 9:30am EST?

maybe it has different behavior while us mkts are closed....

(if it does then its weird....but possible)

@nickray
Copy link
Author

nickray commented Jul 25, 2013

@jreback: No influence, same shape 5, 3 now that the markets are open.

@aginiewicz
Copy link

As a note - I packaged this Arch package and I checked on 2 machines that all tests pass before I uploaded it. When I've set LANG=C all worked, although I've seen few locale related failures, so that's why I suggested checking locale.

Can it be not locale but location dependent? Because it passes for me on same system with same versions of software (unless some optional dependencies can affect this? I have all optional dependencies installed on my machine) - I've checked again right now and it still pass for me.

@jreback
Copy link
Contributor

jreback commented Sep 26, 2013

related to #4242? same test?

@cpcloud
Copy link
Member

cpcloud commented Sep 26, 2013

this was never resolved... so not sure

@jreback
Copy link
Contributor

jreback commented Sep 26, 2013

hmm...wonder if its locale related

@jreback
Copy link
Contributor

jreback commented Oct 4, 2013

@cpcloud you are looking at these? (the locale issue)

@cpcloud
Copy link
Member

cpcloud commented Oct 4, 2013

Yep
On Oct 4, 2013 4:20 PM, "jreback" [email protected] wrote:

@cpcloud https://github.com/cpcloud you are looking at these? (the
locale issue)


Reply to this email directly or view it on GitHubhttps://github.com//issues/4357#issuecomment-25727363
.

@ghost ghost assigned cpcloud Oct 9, 2013
@cpcloud
Copy link
Member

cpcloud commented Oct 9, 2013

closed by #5073

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Data IO issues that don't fit into a more specific label Testing pandas testing functions or related to the test suite Unreliable Test Unit tests that occasionally fail
Projects
None yet
Development

No branches or pull requests

4 participants