Skip to content

DOC: Update documentation for pd.Interval if string endpoints are not allowed anymore #36002

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

Closed
souris-dev opened this issue Aug 31, 2020 · 1 comment · Fixed by #36026
Closed
Labels
Docs Interval Interval data type
Milestone

Comments

@souris-dev
Copy link
Contributor

souris-dev commented Aug 31, 2020

Location of the documentation

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Interval.html

On master:
https://pandas.pydata.org/docs/dev/reference/api/pandas.Interval.html

Documentation problem

The examples in the documentation for pd.Interval show in the end that Intervals with string endpoints can also be created. However, when the example is run on master, a ValueError is raised, saying:

"Only numeric, Timestamp and Timedelta endpoints are allowed when constructing an Interval."

Suggested fix for documentation

If Intervals with strings as endpoints are not allowed anymore, this example should be removed from the documentation.

I've confirmed that the docstring still contains this example, so I'd be happy to make a PR for this if we agree.

@souris-dev souris-dev added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 31, 2020
@dsaxton
Copy link
Member

dsaxton commented Aug 31, 2020

Thanks @souris-dev, looks like you are right (and this evidently hasn't worked at least as far back as 0.25.3). PR certainly welcome.

@dsaxton dsaxton added Interval Interval data type and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Aug 31, 2020
@dsaxton dsaxton added this to the Contributions Welcome milestone Aug 31, 2020
souris-dev added a commit to souris-dev/pandas that referenced this issue Sep 1, 2020
@simonjayhawkins simonjayhawkins modified the milestones: Contributions Welcome, 1.2 Sep 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Interval Interval data type
Projects
None yet
3 participants