Skip to content

DOC: Wrong output in the example of Timedelta.isoformat #38311

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
gurukiran07 opened this issue Dec 5, 2020 · 13 comments · Fixed by #38579
Closed

DOC: Wrong output in the example of Timedelta.isoformat #38311

gurukiran07 opened this issue Dec 5, 2020 · 13 comments · Fixed by #38579

Comments

@gurukiran07
Copy link
Contributor

Location of the documentation

pandas.Timedelta.isoformat

Documentation problem

The output on an example in the docs has the wrong output(Timedelta.isoformat works fine)

Screenshot from 2020-12-04 16-40-36

While it should've been 'P0DT1H0M10S'

@gurukiran07 gurukiran07 added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 5, 2020
@arw2019
Copy link
Member

arw2019 commented Dec 9, 2020

not sure what the issue is, aren't these the same

@gurukiran07
Copy link
Contributor Author

@arw2019
Yes, the same example is given twice in the docs.

The issue is the outptut of pd.Timedelta(hours=1, seconds=10) is wrong in the docs (pd.Timedelta works perfectly fine).

pd.Timedelta(hours=1, seconds=10)
'P0DT1H0M10S'  # In docs it's 'P0DT0H0M10S'

@arw2019
Copy link
Member

arw2019 commented Dec 9, 2020

is this an issue in the docs or with Timedelta?

@gurukiran07
Copy link
Contributor Author

@arw2019

is this an issue in the docs or with Timedelta?

Only related to the docs.

@simonjayhawkins simonjayhawkins added good first issue and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Dec 14, 2020
@simonjayhawkins simonjayhawkins added this to the Contributions Welcome milestone Dec 14, 2020
@simonjayhawkins
Copy link
Member

Examples
--------
>>> td = pd.Timedelta(days=6, minutes=50, seconds=3,
... milliseconds=10, microseconds=10, nanoseconds=12)
>>> td.isoformat()
'P6DT0H50M3.010010012S'
>>> pd.Timedelta(hours=1, seconds=10).isoformat()
'P0DT0H0M10S'
>>> pd.Timedelta(hours=1, seconds=10).isoformat()
'P0DT0H0M10S'
>>> pd.Timedelta(days=500.5).isoformat()
'P500DT12H0MS'

@simonjayhawkins
Copy link
Member

@gurukiran07 Thanks for the report. Interested in submitting a PR?

@gurukiran07
Copy link
Contributor Author

gurukiran07 commented Dec 14, 2020

@simonjayhawkins Yes, will submit. How do I assign it to myself? "take" did not work.

@simonjayhawkins
Copy link
Member

How do I assign it to myself? "take" did not work.

strange. done it manually.

@aflah02
Copy link
Contributor

aflah02 commented Dec 16, 2020

Just wanted to ask can someone else also do issues which have been assigned?

@MarcoGorelli
Copy link
Member

In the future could you please paste the code instead of a screenshot? Else searching through old issues becomes near impossible

@aflah02
Copy link
Contributor

aflah02 commented Dec 19, 2020

Hey @MarcoGorelli
I received a notification for your comment
Just wanted to ask since I'm new here can anyone take up assigned issues as well or is it reserved to the assigned person for some duration?

@MarcoGorelli
Copy link
Member

Looks like there's already a PR to close it #38579

@gurukiran07 I hadn't noticed you'd already assigned yourself here - unless you already have a PR ready, shall we leave it to them, as they're a first-time contributor?

@simonjayhawkins simonjayhawkins modified the milestones: Contributions Welcome, 1.3 Dec 19, 2020
@gurukiran07
Copy link
Contributor Author

gurukiran07 commented Dec 19, 2020

@MarcoGorelli Yes sure fine. I haven't really had the time to time make a PR. Glad some else did. My bad should've unassigned myself quicker.

@gurukiran07 gurukiran07 removed their assignment Dec 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants