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

BUG: Series.quantile dtype / nan handling issue #12772

sinhrks opened this issue Apr 2, 2016 · 0 comments


None yet
1 participant
Copy link

commented Apr 2, 2016

Found some issues when working on #12572. Both being fixed.

Code Sample, a copy-pastable example if possible

1. DataFrame may coerce to float even if interpolation
# OK, same as numpy
pd.Series([1, 2, 3]).quantile([0.5], interpolation='lower').dtypes
# dtype('int64')

# NG, it must be int
pd.DataFrame({'A': [1, 2, 3]}).quantile([0.5], interpolation='lower').dtypes
# A    float64
# dtype: object
2. May return scalar even if its input is a list-like
# NG, it must be a Series
pd.Series([]).quantile([0.2, 0.3])
# nan

output of pd.show_versions()

Current master.

@sinhrks sinhrks added this to the 0.18.1 milestone Apr 2, 2016

@sinhrks sinhrks referenced this issue Apr 2, 2016


CLN: Move boxing logic to BlockManager #12752

5 of 5 tasks complete

jreback added a commit to jreback/pandas that referenced this issue Apr 3, 2016

CLN: Move boxing logic to BlockManager
CLN: clean up quantile & move to BlockManager

closes pandas-dev#12741
closes pandas-dev#12772
closes pandas-dev#12469
closes pandas-dev#12752

@jreback jreback closed this in 36a8bd9 Apr 3, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.