-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix PR10 error and Clean up docstrings from functions related to RT05 errors #25132
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 25 commits
2c4455c
c87102f
d552569
03aaa92
36a610a
c2e24b3
f5cfc8a
6e658f8
5304b9c
7601aed
128dadb
3d3e408
522e76d
163e9e3
b55b270
ba4f001
25e7503
1824b99
1262632
e12ee2a
bfe30f8
d5d270b
6ac909b
4e4f24a
283861f
953159c
15fde16
94e5279
39ab010
64bd51b
7051e3c
a35f869
b847e4e
2d62018
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 |
---|---|---|
|
@@ -288,10 +288,13 @@ def unique(values): | |
|
||
Returns | ||
------- | ||
unique values. | ||
If the input is an Index, the return is an Index | ||
If the input is a Categorical dtype, the return is a Categorical | ||
If the input is a Series/ndarray, the return will be an ndarray. | ||
numpy.ndarray or ExtensionArray | ||
|
||
The return can be: | ||
|
||
- If the input is an Index, the return is an Index. | ||
- If the input is a Categorical dtype, the return is a Categorical. | ||
- If the input is a Series/ndarray, the return will be an ndarray. | ||
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. Same comment here around periods for bullet points |
||
|
||
See Also | ||
-------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4950,10 +4950,14 @@ def pipe(self, func, *args, **kwargs): | |
Returns | ||
------- | ||
DataFrame, Series or scalar | ||
If DataFrame.agg is called with a single function, returns a Series | ||
If DataFrame.agg is called with several functions, returns a DataFrame | ||
If Series.agg is called with single function, returns a scalar | ||
If Series.agg is called with several functions, returns a Series. | ||
|
||
The return can be: | ||
|
||
- If DataFrame.agg is called with a single function, returns a Series. | ||
thoo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- If DataFrame.agg is called with several functions, returns | ||
a DataFrame. | ||
- If Series.agg is called with single function, returns a scalar. | ||
- If Series.agg is called with several functions, returns a Series. | ||
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. Let's do the same thing you are doing below, where instead of putting periods at the end of each bullet you end with a short sentence after the bullets |
||
|
||
%(see_also)s | ||
|
||
|
@@ -6880,11 +6884,14 @@ def asof(self, where, subset=None): | |
------- | ||
scalar, Series, or DataFrame | ||
|
||
Scalar : when `self` is a Series and `where` is a scalar. | ||
Series: when `self` is a Series and `where` is an array-like, | ||
or when `self` is a DataFrame and `where` is a scalar. | ||
DataFrame : when `self` is a DataFrame and `where` is an | ||
array-like. | ||
The return can be: | ||
|
||
* Scalar : when `self` is a Series and `where` is a scalar | ||
* Series: when `self` is a Series and `where` is an array-like, | ||
or when `self` is a DataFrame and `where` is a scalar | ||
* DataFrame : when `self` is a DataFrame and `where` is an | ||
array-like | ||
Return scalar, Sereis, or DataFrame. | ||
WillAyd marked this conversation as resolved.
Show resolved
Hide resolved
WillAyd marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
See Also | ||
-------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1441,7 +1441,7 @@ def sortlevel(self, level=None, ascending=True, sort_remaining=None): | |
|
||
Returns | ||
------- | ||
sorted_index : Index | ||
Index | ||
""" | ||
return self.sort_values(return_indexer=True, ascending=ascending) | ||
|
||
|
@@ -1459,7 +1459,7 @@ def _get_level_values(self, level): | |
|
||
Returns | ||
------- | ||
values : Index | ||
Index | ||
Calling object, as there is only one level in the Index. | ||
|
||
See Also | ||
|
@@ -1504,7 +1504,7 @@ def droplevel(self, level=0): | |
|
||
Returns | ||
------- | ||
index : Index or MultiIndex | ||
Index or MultiIndex | ||
""" | ||
if not isinstance(level, (tuple, list)): | ||
level = [level] | ||
|
@@ -1556,11 +1556,11 @@ def droplevel(self, level=0): | |
Returns | ||
------- | ||
grouper : Index | ||
Index of values to group on | ||
Index of values to group on. | ||
labels : ndarray of int or None | ||
Array of locations in level_index | ||
Array of locations in level_index. | ||
uniques : Index or None | ||
Index of unique values for level | ||
Index of unique values for level. | ||
""" | ||
|
||
@Appender(_index_shared_docs['_get_grouper_for_level']) | ||
|
@@ -2970,9 +2970,9 @@ def _convert_listlike_indexer(self, keyarr, kind=None): | |
|
||
Returns | ||
------- | ||
tuple (indexer, keyarr) | ||
indexer, keyarr | ||
indexer is an ndarray or None if cannot convert | ||
keyarr are tuple-safe keys | ||
keyarr are tuple-safe keys. | ||
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. do you mind documenting both parameters separately? It's done in other parts of this PR |
||
""" | ||
if isinstance(keyarr, Index): | ||
keyarr = self._convert_index_indexer(keyarr) | ||
|
@@ -3156,9 +3156,9 @@ def _reindex_non_unique(self, target): | |
Returns | ||
------- | ||
new_index : pd.Index | ||
Resulting index | ||
Resulting index. | ||
indexer : np.ndarray or None | ||
Indices of output values in original index | ||
Indices of output values in original index. | ||
|
||
""" | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1667,7 +1667,7 @@ def unique(self): | |
* Datetime with Timezone | ||
* Interval | ||
* Sparse | ||
* IntegerNA | ||
* IntegerNA . | ||
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. not sure what we should do here, I understand what you did, and may be it's the best for now, but looks a bit wierd 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've seen this on quite a few other requests. Nuanced but I'm personally of the opinion that this is a "hack" to pass validation so would prefer another route. Can you just add a one-line description after the bullet points instead? |
||
|
||
Examples | ||
-------- | ||
|
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.
Was there a reason for removing
PR10
here or just mistake?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.
It is just a mistake from merge.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.
PR10
is actually not included in the current check at line 245. So I wasn't sure someone excludePR10
but forgot to remove from the message.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 catch. I think this was just missed in #25109 so makes sense to update here accordingly
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.
PR10 is not passing the check withUpdate pandas.ExcelWriter.. versionadded:: 0.24.
. I am going to leave PR10 for now.