-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fixes to docstrings #28001
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
DOC: Fixes to docstrings #28001
Conversation
…ead_csv function, for issue 27655.
…ready determined automatically if left empty.
… some of pandas.ExcelFile.parse (issue pandas-dev#27979)
…pied-over summary from its parent DateOffset
Hello @realjohnward! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2019-08-22 17:01:41 UTC |
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.
Good stuff, thanks for working on this @realjohnward.
Added some comments, and when you address them, please make sure that the CI is green, otherwise we can't merge the changes.
Also, please try to provide a more descriptive title and reference the issue you're working on in the description (you can edit the description, I'm changing the title myself).
asv_bench/benchmarks/io/json.py
Outdated
@@ -4,7 +4,6 @@ | |||
|
|||
from ..pandas_vb_common import BaseIO | |||
|
|||
|
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.
Can you undo this please, besides probably being the reason to have the CI in green, we are strict about not including unrelated changes to PR, to keep the maintenance of the project under control.
pandas/io/parsers.py
Outdated
@@ -422,6 +422,8 @@ def _read(filepath_or_buffer: FilePathOrBuffer, kwds): | |||
if encoding is not None: | |||
encoding = re.sub("_", "-", encoding).lower() | |||
kwds["encoding"] = encoding | |||
elif encoding is None and kwds.get("auto_encode"): | |||
kwds["encoding"] = 'auto' |
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.
Can you have the code changes in a separate PR please?
Dict-like IO interface for storing pandas objects in PyTables | ||
either Fixed or Table format. | ||
Dict-like IO interface for storing pandas objects in PyTables. | ||
Either Fixed or Table format. |
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.
Can you leave a blank line between the two paragraphs.
pandas/io/pytables.py
Outdated
Return a (potentially unordered) list of the keys corresponding to the | ||
objects stored in the HDFStore. These are ABSOLUTE path-names (e.g. | ||
have the leading '/' | ||
Return a (potentially unordered) list of the keys corresponding to the objects stored in the HDFStore. |
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.
Not sure if this is too long, can you check the CI please?
pandas/io/pytables.py
Outdated
fixed(f) : Fixed format | ||
Fast writing/reading. Not-appendable, nor searchable | ||
table(t) : Table format | ||
format : 'Fixed(f)|Table(t)', default is 'fixed' |
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.
If you don't mind, can you leave just one space in each side of the colon? I know it's from the original code, not your changed, but would be good to have this fixed.
pandas/io/pytables.py
Outdated
format : 'Fixed(f)|Table(t)', default is 'fixed' | ||
Fixed(f) : Fixed format | ||
Fast writing/reading. Not-appendable, nor searchable. | ||
Table(t) : Table format |
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.
I think this is incorrect, I know you did it to make the validation of the docstring not fail, but we'll have to find another solution, you can just restore how it was for now.
pandas/io/pytables.py
Outdated
@@ -1202,18 +1213,17 @@ def walk(self, where="/"): | |||
|
|||
Parameters | |||
---------- | |||
where : str, optional | |||
where : str, optional, default "/" |
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.
you can remove the optional, we used it when the default is None
pandas/tseries/offsets.py
Outdated
See Also | ||
-------- | ||
dateutil.relativedelta.relativedelta | ||
dateutil.relativedelta.relativedelta : The relativedelta type is designed to be applied to an existing datetime an can replace specific components of that datetime, or represents an interval of time. |
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.
You'll have to split the description in different lines, this is surely too long. Also, leave just one space after the colon.
just saw you did reference the issue in the PR, you can check how we usually do (the hash makes github create a link to this PR in the issue) |
Thank you @datapythonista for looking over this PR and requesting changes. I am creating another PR with the requested changes made. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Partially resolves issue