-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Update examples with imports #16424
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
Update examples with imports #16424
Conversation
pandas/core/frame.py
Outdated
@@ -247,11 +247,13 @@ class DataFrame(NDFrame): | |||
|
|||
Examples | |||
-------- | |||
>>> import numpy as np | |||
>>> import pandas as pd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those two are not needed (we assume those, to not have to repeat those in each docstring. Also the tutorial docs everywhere assume those two imports)
What do you mean with "variable ts1, ts2,"? |
@jorisvandenbossche they are in the DataFrame class docstring
@vparekh94 it'd be nice to expand that a bit with text in between each explaining the data being passed in. Like
(might not have the newlines entirely correct there. |
Oh, I was really blind .. :-) But indeed, @TomAugspurger 's suggestion is the way to go! |
@vparekh94 are you able to update this? You can push additional commits to this branch. |
Codecov Report
@@ Coverage Diff @@
## master #16424 +/- ##
==========================================
- Coverage 90.42% 90.42% -0.01%
==========================================
Files 161 161
Lines 51023 51023
==========================================
- Hits 46138 46137 -1
- Misses 4885 4886 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #16424 +/- ##
==========================================
- Coverage 90.42% 90.42% -0.01%
==========================================
Files 161 161
Lines 51023 51023
==========================================
- Hits 46138 46137 -1
- Misses 4885 4886 +1
Continue to review full report at Codecov.
|
can you rebase and update? |
@vparekh94 sorry for the oversight on out part, but this has been fixed in the meantime in another PR #16487. |
Variable ts1, ts2, and index are never defined in dataframe df. Should ts1 and ts2 be strings and can we get rid of the index variable?