-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fixes to docstrings, mainly PR09 errors #29530
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
Changes from 17 commits
fb76a17
0f40afb
94ac074
e8a5ab1
90cc836
9e6d290
64b7c75
d84b2a1
214add3
705f441
b3f1074
9d7f405
cb524fd
9a517aa
b99d417
8095d30
e8c4c50
a86a34b
76daea6
e6094eb
04bc5a4
2e427e9
735e6c2
0292b1e
2f3b875
405da2b
4f718eb
84ab4da
60d9a1f
7d1bcdd
9585d6e
9d5ed04
a049e8d
af1d4d9
abe0eb8
44755f1
796828f
6e703aa
4525b08
1fd931a
a5eb1a9
3ff70b4
080a77b
de22262
c56b0f9
18f492e
0826a6f
25167fb
c4848eb
0f9c6d1
2f72294
d434831
fdc670e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -277,7 +277,7 @@ fi | |
### DOCSTRINGS ### | ||
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then | ||
|
||
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG | ||
MSG='Validate docstrings (GL03, GL04, GL05, GL06, GL07, GL09, GL10, SS04, SS05, PR03, PR04, PR05,PR09, PR10, EX04, RT01, RT04, RT05, SA01, SA02, SA03, SA05)' ; echo $MSG | ||
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL04,GL05,GL06,GL07,GL09,GL10,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT01,RT04,RT05,SA01,SA02,SA03,SA05 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you should add the error you fixed here too, the previous is only a message for the log |
||
RET=$(($RET + $?)) ; echo $MSG "DONE" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,11 +138,12 @@ | |
Name or list of names to sort by. | ||
|
||
- if `axis` is 0 or `'index'` then `by` may contain index | ||
levels and/or column labels | ||
levels and/or column labels. | ||
- if `axis` is 1 or `'columns'` then `by` may contain column | ||
levels and/or index labels | ||
levels and/or index labels. | ||
|
||
.. versionchanged:: 0.23.0 | ||
|
||
Allow specifying index or column level names.""", | ||
versionadded_to_excel="", | ||
optional_labels="""labels : array-like, optional | ||
|
@@ -2241,9 +2242,10 @@ def to_html( | |
A ``border=border`` attribute is included in the opening | ||
`<table>` tag. Default ``pd.options.display.html.border``. | ||
encoding : str, default "utf-8" | ||
Set character encoding | ||
Set character encoding. | ||
|
||
.. versionadded:: 1.0 | ||
|
||
table_id : str, optional | ||
A css id is included in the opening `<table>` tag if specified. | ||
|
||
|
@@ -7321,7 +7323,7 @@ def corr(self, method="pearson", min_periods=1): | |
will have 1 along the diagonals and will be symmetric | ||
regardless of the callable's behavior. | ||
|
||
.. versionadded:: 0.24.0 | ||
.. versionadded:: 0.24.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The indentation here is still incorrect I think, but it's actually also the existing lines above that are wrong. The text in that last list item should not indent more than "callable" (and then the versionadded should be at the same indentation level as this text). Now you are at it, would you like to fix this as well? |
||
|
||
min_periods : int, optional | ||
Minimum number of observations required per pair of columns | ||
|
@@ -7887,7 +7889,7 @@ def idxmin(self, axis=0, skipna=True): | |
Parameters | ||
---------- | ||
axis : {0 or 'index', 1 or 'columns'}, default 0 | ||
The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise | ||
The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise. | ||
skipna : bool, default True | ||
Exclude NA/null values. If an entire row/column is NA, the result | ||
will be NA. | ||
|
@@ -7925,7 +7927,7 @@ def idxmax(self, axis=0, skipna=True): | |
Parameters | ||
---------- | ||
axis : {0 or 'index', 1 or 'columns'}, default 0 | ||
The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise | ||
The axis to use. 0 or 'index' for row-wise, 1 or 'columns' for column-wise. | ||
skipna : bool, default True | ||
Exclude NA/null values. If an entire row/column is NA, the result | ||
will be NA. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ | |
* If None, then parse all columns. | ||
* If int, then indicates last column to be parsed. | ||
|
||
.. deprecated:: 0.24.0 | ||
.. deprecated:: 0.24.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this change is fully correct, as the "deprecated" notion is specific to this bullet item, not to the general keyword (the same might be true for the other occurrences here) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, thanks for reviewing. While i agree that it would be better to have the warning indented, that breaks the validation, raising error The way the docs render without the two spaces, seen below, I think are sufficiently clear about what the warning is referring to but I'm open to other solutions. I just haven't found any. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Then I would consider that a bug in the validation script that could be fixed instead? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe @datapythonista can speak to exactly what is being worked on in the checks, I know there are some changes in the works to handle bulleted lists without leading text. |
||
Pass in a list of int instead from 0 to `usecols` inclusive. | ||
|
||
* If str, then indicates comma separated list of Excel column letters | ||
|
@@ -91,14 +91,14 @@ | |
* If list of int, then indicates list of column numbers to be parsed. | ||
* If list of string, then indicates list of column names to be parsed. | ||
|
||
.. versionadded:: 0.24.0 | ||
.. versionadded:: 0.24.0 | ||
|
||
* If callable, then evaluate each column name against it and parse the | ||
column if the callable returns ``True``. | ||
|
||
Returns a subset of the columns according to behavior above. | ||
|
||
.. versionadded:: 0.24.0 | ||
.. versionadded:: 0.24.0 | ||
|
||
squeeze : bool, default False | ||
If the parsed data only contains one column then return a Series. | ||
|
@@ -540,8 +540,10 @@ def parse( | |
|
||
class ExcelWriter(metaclass=abc.ABCMeta): | ||
""" | ||
Class for writing DataFrame objects into excel sheets, default is to use | ||
xlwt for xls, openpyxl for xlsx. See DataFrame.to_excel for typical usage. | ||
Class for writing DataFrame objects into excel sheets. | ||
|
||
Default is to use xlwt for xls, openpyxl for xlsx. | ||
See DataFrame.to_excel for typical usage. | ||
|
||
Parameters | ||
---------- | ||
|
@@ -555,7 +557,7 @@ class ExcelWriter(metaclass=abc.ABCMeta): | |
Format string for dates written into Excel files (e.g. 'YYYY-MM-DD'). | ||
datetime_format : str, default None | ||
Format string for datetime objects written into Excel files. | ||
(e.g. 'YYYY-MM-DD HH:MM:SS') | ||
(e.g. 'YYYY-MM-DD HH:MM:SS'). | ||
mode : {'w', 'a'}, default 'w' | ||
File mode to use (write or append). | ||
|
||
|
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.
nit, can you add a space before and remove the extra