We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This sometimes gets them out of order:
import xarray as xr import numpy as np data = xr.DataArray(np.arange(100), dims='x', coords={'x': np.linspace(-100, 100, num=100)}) print(data.groupby_bins('x', bins=11).mean().to_series())
x_bins (-100.2, -81.818] 4.5 (-27.273, -9.0909] 41.0 (-45.455, -27.273] 32.0 (-63.636, -45.455] 23.0 (-81.818, -63.636] 14.0 (-9.0909, 9.0909] 50.0 (27.273, 45.455] 68.0 (45.455, 63.636] 77.0 (63.636, 81.818] 86.0 (81.818, 100] 95.0 (9.0909, 27.273] 59.0 dtype: float64
We should pass through sort=False to pd.factorize in groupby.unique_value_groups when using bins to avoid this.
sort=False
pd.factorize
groupby.unique_value_groups
CC @chrisroat @rabernat
The text was updated successfully, but these errors were encountered:
Good catch. Should be an easy fix. I can put together a PR.
Sorry, something went wrong.
No branches or pull requests
This sometimes gets them out of order:
We should pass through
sort=False
topd.factorize
ingroupby.unique_value_groups
when using bins to avoid this.CC @chrisroat @rabernat
The text was updated successfully, but these errors were encountered: