Skip to content

TST: added tests for sparse and date range quantiles #35236

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

Merged
merged 2 commits into from
Jul 16, 2020
Merged

TST: added tests for sparse and date range quantiles #35236

merged 2 commits into from
Jul 16, 2020

Conversation

sanders41
Copy link
Contributor

Added tests for sparse and date range quantiles

@sanders41
Copy link
Contributor Author

I'm new to Travis CI and based on the error I am seeing in the error log I am not understanding what is causing the issue: requests.exceptions.ChunkedEncodingError: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')).

Anyone have any insight into what would cause this?

df = pd.DataFrame({0: s, 1: s1})
result = df.quantile()
# GH#24600
result = df.quantile(0.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm this should work with df.quantile() yes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we test this elsewhere so prob ok here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes df.quantile() works the same. I can change this.

ser = pd.Series(dti)
df = pd.DataFrame(ser)

result = df.quantile(0.5)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

expected is NO values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has no values unless it is run with numeric_only set to false. So it would be result = df.quantile(numeric_only=False) instead of result = df.quantile().

It probably makes more sense to change it and set numeric_only to false correct?

@jreback jreback added Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Sparse Sparse Data Type Testing pandas testing functions or related to the test suite labels Jul 13, 2020
@sanders41 sanders41 requested a review from jreback July 13, 2020 23:23
@jreback jreback added this to the 1.1 milestone Jul 16, 2020
@jreback jreback merged commit 5119ebf into pandas-dev:master Jul 16, 2020
@jreback
Copy link
Contributor

jreback commented Jul 16, 2020

thanks @sanders41

@sanders41 sanders41 deleted the sparsearray-quantile-test branch July 16, 2020 15:29
fangchenli pushed a commit to fangchenli/pandas that referenced this pull request Jul 16, 2020
* TST: added tests for sparse and date range quantiles

* TST: updating quantile arguments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Algos Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff Sparse Sparse Data Type Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: DataFrame[Sparse] quantile fails because SparseArray has no reshape
2 participants