Skip to content

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

Merged
merged 2 commits into from
Jul 7, 2018
Merged

Changed import statements in examples in DOCs #21774

merged 2 commits into from
Jul 7, 2018

Conversation

alphaCTzo7G
Copy link
Contributor

This is regarding Issue #21749

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

@pep8speaks
Copy link

pep8speaks commented Jul 6, 2018

Hello @alphaCTzo7G! Thanks for updating the PR.

Line 504:80: E501 line too long (80 > 79 characters)

Comment last updated on July 07, 2018 at 19:26 Hours UTC

>>> from pandas import DataFrame
>>> from numpy.random import randn
>>> bar = DataFrame(randn(10, 4))
>>> import numpy as np
Copy link
Contributor

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?

Copy link
Contributor Author

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..

Copy link
Member

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

Copy link
Member

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

Copy link
Member

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!

Copy link
Contributor Author

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..

Copy link
Contributor

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

@jreback jreback added the Docs label Jul 6, 2018
@jreback jreback added this to the 0.24.0 milestone Jul 6, 2018
@codecov
Copy link

codecov bot commented Jul 7, 2018

Codecov Report

Merging #21774 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #21774   +/-   ##
=======================================
  Coverage   91.93%   91.93%           
=======================================
  Files         160      160           
  Lines       49737    49737           
=======================================
  Hits        45724    45724           
  Misses       4013     4013
Flag Coverage Δ
#multiple 90.3% <ø> (ø) ⬆️
#single 41.99% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/sparse/series.py 95.2% <ø> (ø) ⬆️
pandas/tseries/holiday.py 93.1% <ø> (ø) ⬆️
pandas/io/sas/sas_xport.py 90.27% <ø> (ø) ⬆️
pandas/plotting/_core.py 83.57% <ø> (ø) ⬆️
pandas/core/series.py 94.2% <ø> (ø) ⬆️
pandas/io/pytables.py 92.48% <ø> (ø) ⬆️
pandas/plotting/_misc.py 38.98% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3be3254...f3ee814. Read the comment docs.

@jorisvandenbossche jorisvandenbossche merged commit 3091755 into pandas-dev:master Jul 7, 2018
@jorisvandenbossche
Copy link
Member

Thanks!

@alphaCTzo7G
Copy link
Contributor Author

I noticed and corrected some other inconsistent references to pandas DataStrucutres
as per comment by @jreback, while correcting the import statements.

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?

@jorisvandenbossche
Copy link
Member

Yes, new PR is easiest to review!

@alphaCTzo7G alphaCTzo7G deleted the change_import_statements_in_DOCs branch July 7, 2018 23:52
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants