Skip to content

DOC: clean io.rst codeblocks for PEP8 #20632

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 5 commits into from
Apr 11, 2018
Merged

Conversation

pulkitmaloo
Copy link
Contributor

@pulkitmaloo pulkitmaloo commented Apr 8, 2018

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

  • PR title is "DOC: update the docstring"
  • The validation script passes: scripts/validate_docstrings.py <your-function-or-method>
  • The PEP8 style check passes: git diff upstream/master -u -- "*.py" | flake8 --diff
  • The html version looks good: python doc/make.py --single <your-function-or-method>
  • It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:


If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.

Checklist for other PRs (remove this part if you are doing a PR for the pandas documentation sprint):

@codecov
Copy link

codecov bot commented Apr 8, 2018

Codecov Report

Merging #20632 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20632      +/-   ##
==========================================
+ Coverage   91.83%   91.84%   +0.01%     
==========================================
  Files         153      153              
  Lines       49269    49256      -13     
==========================================
- Hits        45247    45241       -6     
+ Misses       4022     4015       -7
Flag Coverage Δ
#multiple 90.23% <ø> (+0.01%) ⬆️
#single 41.9% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/_test_decorators.py 91.89% <0%> (-0.11%) ⬇️
pandas/core/frame.py 97.15% <0%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (ø) ⬆️
pandas/io/formats/printing.py 89.38% <0%> (ø) ⬆️
pandas/plotting/_core.py 82.5% <0%> (+0.11%) ⬆️
pandas/util/testing.py 84.73% <0%> (+0.34%) ⬆️

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 4e6aa1c...6411746. Read the comment docs.

Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is very welcome. Added a minor comment

@@ -921,7 +921,7 @@ Note that performance-wise, you should try these methods of parsing dates in ord
1. Try to infer the format using ``infer_datetime_format=True`` (see section below).

2. If you know the format, use ``pd.to_datetime()``:
``date_parser=lambda x: pd.to_datetime(x, format=...)``.
``date_parser = lambda x: pd.to_datetime(x, format=...)``.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is not necessarily correct, as date_parser is a keyword, and for keywords in function calls no spaces ...

index=pd.date_range('20000101', periods=1000))
store.append('df_coord', df_coord)
c = store.select_as_coordinates('df_coord', 'index > 20020101')
c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change of c.summary() to c was on purpose? (not familiar with HDFStore)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.summary() was recently deprecate so this is ok

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, the return value is an index, not HFDStore, OK +1

@jorisvandenbossche jorisvandenbossche added Docs Code Style Code style, linting, code_checks labels Apr 9, 2018
@jorisvandenbossche jorisvandenbossche changed the title DOC: updated the io.rst codeblocks DOC: clean io.rst codeblocks for PEP8 Apr 9, 2018
@jreback jreback added this to the 0.23.0 milestone Apr 11, 2018
@jreback jreback merged commit d91b706 into pandas-dev:master Apr 11, 2018
@jreback
Copy link
Contributor

jreback commented Apr 11, 2018

thanks @pulkitmaloo (fixed a few typos)

@pulkitmaloo
Copy link
Contributor Author

Thanks for fixing the typos and accepting the PR.
I found some more doc's code-blocks are not PEP8 compliant. I will work on it and create a new PR.

@pulkitmaloo pulkitmaloo deleted the io-docs branch August 2, 2018 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Style Code style, linting, code_checks Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: io.rst uses deprecated Index.summary
3 participants