html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/1731#issuecomment-346160627,https://api.github.com/repos/pydata/xarray/issues/1731,346160627,MDEyOklzc3VlQ29tbWVudDM0NjE2MDYyNw==,1217238,2017-11-21T21:05:18Z,2017-11-21T21:05:18Z,MEMBER,"> nanrankdata only support numeric types, how about wrapping rankdata with a keyword option ? We already do dispatching to appropriate functions based on the dtype for aggregations: https://github.com/pydata/xarray/blob/9d09c1659741dafb1fadeed49c81f9e90a548b07/xarray/core/duck_array_ops.py#L174 (Yes, this is a bit of a mess) Since `NaN` has a consistent sorting position in NumPy/bottleneck (it sorts to the end), I would suggest including a `skipna` keyword argument, like one we use for aggregation functions. Alternatively, we could use `na_option : {‘keep’, ‘top’, ‘bottom’}` [like pandas](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.rank.html). > There's also a push push method similar to pandas ffill which would be nice. @jhamman is already working on `ffill`/`bfill` in https://github.com/pydata/xarray/pull/1640","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,275461273 https://github.com/pydata/xarray/issues/1731#issuecomment-346084931,https://api.github.com/repos/pydata/xarray/issues/1731,346084931,MDEyOklzc3VlQ29tbWVudDM0NjA4NDkzMQ==,3621629,2017-11-21T16:37:37Z,2017-11-21T16:38:32Z,CONTRIBUTOR,"A few points: * `nanrankdata` only support numeric types, how about wrapping `rankdata` with a keyword option ? * There's also a push `push` method similar to pandas `ffill` which would be nice. * `move_rank` outputs are not normalized as `rankdata`, this might be a bit confusing","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,275461273 https://github.com/pydata/xarray/issues/1731#issuecomment-346075273,https://api.github.com/repos/pydata/xarray/issues/1731,346075273,MDEyOklzc3VlQ29tbWVudDM0NjA3NTI3Mw==,5635139,2017-11-21T16:08:22Z,2017-11-21T16:08:22Z,MEMBER,"Great idea. We use `bottleneck.nanrankdata` manually; I don't think there's a vectorized numpy fallback","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,275461273 https://github.com/pydata/xarray/issues/1731#issuecomment-345918316,https://api.github.com/repos/pydata/xarray/issues/1731,345918316,MDEyOklzc3VlQ29tbWVudDM0NTkxODMxNg==,2443309,2017-11-21T05:06:49Z,2017-11-21T05:06:49Z,MEMBER,"> Is there any reason not to expose a wrapper to bottleneck.nanrankdata @0x0L - I don't think so and I think we'd be open to adding this function. Even better if there is a fallback numpy equivalent but I don't think that would be required. I looked at the (my) whatsnew note from 0.9.2 and I it seems we decided to remove this option until there is a rank method for dataarray/dataset objects. See @shoyer's comment: https://github.com/pydata/xarray/pull/1278#discussion_r103511989","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,275461273