-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Changed import statements in examples in DOCs #21774
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
Changed import statements in examples in DOCs #21774
Conversation
Hello @alphaCTzo7G! Thanks for updating the PR.
Comment last updated on July 07, 2018 at 19:26 Hours UTC |
pandas/io/pytables.py
Outdated
>>> from pandas import DataFrame | ||
>>> from numpy.random import randn | ||
>>> bar = DataFrame(randn(10, 4)) | ||
>>> import numpy as np |
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.
@jorisvandenbossche @TomAugspurger do we normally explicity list these?
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.
Yeah.. I wasn't sure either.. In some places, its explicitly listed, and in others its not. So in the few places where it seemed, it would help, I explicitly listed them.. but I can take them out as well..
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.
We do not, you can remove all occurences of import numpy as np
and 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.
We do not, you can remove all occurences of import numpy as np
and 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.
Apart from that, looking really good!
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.
Ok.. sounds good. I will remove the import numpy as np
and import pandas as pd
. If there is a pd.DataFrame
or np.random
being defined or something similar.. should I convert it back to just DataFrame
and random
respectively? Wondering if there is a good reference.. so I can convert these to the correct format in one shot..
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.
no, we always assume these as imports
Codecov Report
@@ Coverage Diff @@
## master #21774 +/- ##
=======================================
Coverage 91.93% 91.93%
=======================================
Files 160 160
Lines 49737 49737
=======================================
Hits 45724 45724
Misses 4013 4013
Continue to review full report at Codecov.
|
Thanks! |
I noticed and corrected some other inconsistent references to pandas DataStrucutres They are in this branch: https://github.com/alphaCTzo7G/pandas/tree/correct_ref_DataStructures Do these look ok? And should I create a separate PR? |
Yes, new PR is easiest to review! |
This is regarding Issue #21749
git diff upstream/master -u -- "*.py" | flake8 --diff