Skip to content

Test pandas 0.19.0 rc1 - #1540

Merged
jcrist merged 3 commits into
dask:masterfrom
mrocklin:pandas-0.19-rc1
Oct 6, 2016
Merged

jcrist merged 3 commits into
dask:masterfrom
mrocklin:pandas-0.19-rc1

Conversation

@mrocklin

Copy link
Copy Markdown
Member

No description provided.

@mrocklin

mrocklin commented Oct 5, 2016

Copy link
Copy Markdown
Member Author

Blocked on

pandas-dev/pandas#14354
#1616

Previously we'd accidently call compute here when inferring metadata.
The new groupby implementation segfaults when threads are used to
compute the index (apparently), which could happen in some cases.  It's
easier just to let `aca` handle the metadata inference, so we'll remove
it.
@jcrist

jcrist commented Oct 6, 2016

Copy link
Copy Markdown
Member

The only thing still failing is the timestamp indexing, which I believe is caused by pandas-dev/pandas#14354. Do we want to fix it locally dependent on version, or wait for a pandas upstream fix?

@mrocklin

mrocklin commented Oct 6, 2016

Copy link
Copy Markdown
Member Author

I briefly tried doing the following:

diff --git a/dask/dataframe/indexing.py b/dask/dataframe/indexing.py
index cc1d8aa..0445091 100644
--- a/dask/dataframe/indexing.py
+++ b/dask/dataframe/indexing.py
@@ -96,10 +96,15 @@ def _maybe_partial_time_string(index, indexer, kind):
             stop = index._maybe_cast_slice_bound(indexer.stop, 'right', kind)
         else:
             stop = indexer.stop
+
+        if start > stop:
+            start, stop = stop, start
         return slice(start, stop)

     elif isinstance(indexer, pd.compat.string_types):
         start = index._maybe_cast_slice_bound(indexer, 'left', 'loc')
         stop = index._maybe_cast_slice_bound(indexer, 'right', 'loc')
+        if start > stop:
+            start, stop = stop, start
         return slice(start, stop)
     return indexer

Some problems persisted. They might be resolvable though.

I'm somewhat in favor of patching this temporarily on the dask.dataframe side unless Pandas intends to release a bugfix patch quickly.

@jcrist

jcrist commented Oct 6, 2016

Copy link
Copy Markdown
Member

I just pushed a simple fix for the indexing issue. I think this covers all the pandas 0.19.0 issues.

@mrocklin

mrocklin commented Oct 6, 2016

Copy link
Copy Markdown
Member Author

Grand!

@jcrist

jcrist commented Oct 6, 2016

Copy link
Copy Markdown
Member

All tests passed. Merging.

@jcrist
jcrist merged commit 10af53a into dask:master Oct 6, 2016
@jcrist
jcrist deleted the pandas-0.19-rc1 branch October 6, 2016 22:47
@jreback

jreback commented Oct 6, 2016

Copy link
Copy Markdown
Contributor

ideally you should use the api functions

pd.types.api.is_categorical

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants