Skip to content
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

TST: fix to_xarray xfails #18115

Closed
jreback opened this issue Nov 4, 2017 · 4 comments
Closed

TST: fix to_xarray xfails #18115

jreback opened this issue Nov 4, 2017 · 4 comments
Assignees
Labels
Testing pandas testing functions or related to the test suite
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Nov 4, 2017

not sure what is going on here, but I think we need to adjust / make a min for xarray in our tests.

xef #18114

cc @shoyer

@jreback jreback added the Testing pandas testing functions or related to the test suite label Nov 4, 2017
@jreback jreback added this to the 0.22.0 milestone Nov 4, 2017
@shoyer
Copy link
Member

shoyer commented Nov 4, 2017

@jreback can you point me to a build failure? Looking at #18114 everything on Travis is either cancelled or successful.

@jreback
Copy link
Contributor Author

jreback commented Nov 4, 2017

I have xfailed them, but here's the comparision.

I think when I originally wrote these tests we were on xarray < 0.9

In [1]: import xarray

In [2]: xarray.__version__
Out[2]: '0.9.6'

In [3]: pd.__version__
Out[3]: '0.22.0.dev0+61.g744dcd3'

In [6]: s = Series(range(6), list('abcdef'))

In [7]: s
Out[7]: 
a    0
b    1
c    2
d    3
e    4
f    5
dt

In [8]: s.to_xarray()
Out[8]: 
<xarray.DataArray (index: 6)>
array([0, 1, 2, 3, 4, 5])
Coordinates:
  * index    (index) object 'a' 'b' 'c' 'd' 'e' 'f'

In [9]: s.to_xarray().to_series()
Out[9]: 
index
a        0
b        1
c        2
d        3
e        4
f        5
dtype: int64

In [10]: s.to_xarray().to_series().index
Out[10]: 
MultiIndex(levels=[['a', 'b', 'c', 'd', 'e', 'f']],
           labels=[[0, 1, 2, 3, 4, 5]],
           names=['index'])

so I was testing for idempotency, e.g. [6] roundtrips to [9].

now it seems we get a MultiIndex back (rather than the original index).

@shoyer
Copy link
Member

shoyer commented Nov 4, 2017

Gotcha, thanks. This was introduced by #17236 and fixed in xarray by pydata/xarray#1548. That will be in our next release, which will come out very soon (we just issued a release candidate).

@shoyer shoyer self-assigned this Nov 4, 2017
@jreback
Copy link
Contributor Author

jreback commented Nov 4, 2017

ahh ok great. then I will change the xfails to be < 0.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

2 participants