-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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 5 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 |
---|---|---|
|
@@ -289,9 +289,10 @@ 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 | ||
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 | ||||
---|---|---|---|---|---|---|
|
@@ -1292,7 +1292,7 @@ def __array__(self, dtype=None): | |||||
values : numpy array | ||||||
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.
Suggested change
|
||||||
A numpy array of either the specified dtype or, | ||||||
if dtype==None (default), the same dtype as | ||||||
categorical.categories.dtype | ||||||
categorical.categories.dtype . | ||||||
thoo marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
""" | ||||||
ret = take_1d(self.categories.values, self._codes) | ||||||
if dtype and not is_dtype_equal(dtype, self.categories.dtype): | ||||||
|
@@ -1501,7 +1501,7 @@ def get_values(self): | |||||
------- | ||||||
values : numpy array | ||||||
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.
Suggested change
|
||||||
A numpy array of the same dtype as categorical.categories.dtype or | ||||||
Index if datetime / periods | ||||||
Index if datetime / periods. | ||||||
""" | ||||||
# if we are a datetime and period index, return Index to keep metadata | ||||||
if is_datetimelike(self.categories): | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -2797,7 +2797,7 @@ def set_value(self, index, col, value, takeable=False): | |||||
------- | ||||||
frame : DataFrame | ||||||
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.
Suggested change
|
||||||
If label pair is contained, will be reference to calling DataFrame, | ||||||
otherwise a new object | ||||||
otherwise a new object. | ||||||
""" | ||||||
warnings.warn("set_value is deprecated and will be removed " | ||||||
"in a future release. Please use " | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -4951,10 +4951,12 @@ 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 | ||||||
|
||||||
|
@@ -5350,7 +5352,7 @@ def get_values(self): | |||||
Returns | ||||||
------- | ||||||
numpy.ndarray | ||||||
Numpy representation of DataFrame | ||||||
Numpy representation of DataFrame. | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -5429,7 +5431,7 @@ def get_ftype_counts(self): | |||||
------- | ||||||
dtype : 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.
Suggested change
|
||||||
Series with the count of columns with each type and | ||||||
sparsity (dense/sparse) | ||||||
sparsity (dense/sparse). | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -6658,7 +6660,7 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None, | |||||
------- | ||||||
Series or DataFrame | ||||||
Returns the same object type as the caller, interpolated at | ||||||
some or all ``NaN`` values | ||||||
some or all ``NaN`` values. | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -6882,7 +6884,7 @@ def asof(self, where, subset=None): | |||||
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 | ||||||
array-like. | ||||||
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 about making a list |
||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -7236,7 +7238,7 @@ def clip(self, lower=None, upper=None, axis=None, inplace=False, | |||||
------- | ||||||
Series or DataFrame | ||||||
Same type as calling object with the values outside the | ||||||
clip boundaries replaced | ||||||
clip boundaries replaced. | ||||||
|
||||||
Examples | ||||||
-------- | ||||||
|
@@ -8387,7 +8389,7 @@ def ranker(data): | |||||
Returns | ||||||
------- | ||||||
(left, right) : (%(klass)s, type of other) | ||||||
Aligned objects | ||||||
Aligned objects. | ||||||
""") | ||||||
|
||||||
@Appender(_shared_docs['align'] % _shared_doc_kwargs) | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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']) | ||
|
@@ -1828,7 +1828,7 @@ def isna(self): | |
Returns | ||
------- | ||
numpy.ndarray | ||
A boolean array of whether my values are NA | ||
A boolean array of whether my values are NA. | ||
|
||
See Also | ||
-------- | ||
|
@@ -2972,7 +2972,7 @@ def _convert_listlike_indexer(self, keyarr, kind=None): | |
------- | ||
tuple (indexer, keyarr) | ||
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 having two return params instead |
||
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) | ||
|
@@ -3098,9 +3098,9 @@ def reindex(self, target, method=None, level=None, limit=None, | |
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. | ||
|
||
""" | ||
# GH6552: preserve names when reindexing to non-named target | ||
|
@@ -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. | ||
|
||
""" | ||
|
||
|
@@ -4259,7 +4259,7 @@ def shift(self, periods=1, freq=None): | |
Returns | ||
------- | ||
pandas.Index | ||
Shifted index | ||
Shifted index. | ||
|
||
See Also | ||
-------- | ||
|
@@ -4422,7 +4422,7 @@ def set_value(self, arr, key, value): | |
in the target are marked by -1. | ||
missing : ndarray of int | ||
An indexer into the target of the values not found. | ||
These correspond to the -1 in the indexer array | ||
These correspond to the -1 in the indexer array. | ||
""" | ||
|
||
@Appender(_index_shared_docs['get_indexer_non_unique'] % _index_doc_kwargs) | ||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -1209,7 +1209,7 @@ def set_value(self, label, value, takeable=False): | |||||
------- | ||||||
series : 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.
Suggested change
|
||||||
If label is contained, will be reference to calling Series, | ||||||
otherwise a new object | ||||||
otherwise a new object. | ||||||
""" | ||||||
warnings.warn("set_value is deprecated and will be removed " | ||||||
"in a future release. Please use " | ||||||
|
@@ -1629,7 +1629,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? |
||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -59,7 +59,7 @@ def to_numeric(arg, errors='raise', downcast=None): | |||||
Returns | ||||||
------- | ||||||
ret : numeric if parsing succeeded. | ||||||
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.
Suggested change
|
||||||
Return type depends on input. Series if Series, otherwise ndarray | ||||||
Return type depends on input. Series if Series, otherwise 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.
Suggested change
|
||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -433,7 +433,7 @@ def render(self, **kwargs): | |||||
Returns | ||||||
------- | ||||||
rendered : str | ||||||
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.
Suggested change
|
||||||
The rendered HTML | ||||||
The rendered HTML. | ||||||
|
||||||
Notes | ||||||
----- | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.