-
-
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 18 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 | ||
unique values | ||
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. This should be the type, can you find out what's the returned Python type, and move this to the description please? |
||
|
||
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. | ||||||
""" | ||||||
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 | ||||
---|---|---|---|---|---|---|
|
@@ -1145,7 +1145,7 @@ def to_numpy(self, dtype=None, copy=False): | |||||
|
||||||
Returns | ||||||
------- | ||||||
array : numpy.ndarray | ||||||
numpy.ndarray | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -1439,7 +1439,7 @@ def from_records(cls, data, index=None, exclude=None, columns=None, | |||||
|
||||||
Returns | ||||||
------- | ||||||
df : DataFrame | ||||||
DataFrame | ||||||
""" | ||||||
|
||||||
# Make a copy of the input columns so we can modify it | ||||||
|
@@ -1755,7 +1755,7 @@ def from_items(cls, items, columns=None, orient='columns'): | |||||
|
||||||
Returns | ||||||
------- | ||||||
frame : DataFrame | ||||||
DataFrame | ||||||
""" | ||||||
|
||||||
warnings.warn("from_items is deprecated. Please use " | ||||||
|
@@ -1866,7 +1866,7 @@ def from_csv(cls, path, header=0, sep=',', index_col=0, parse_dates=True, | |||||
|
||||||
Returns | ||||||
------- | ||||||
y : DataFrame | ||||||
DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -1956,7 +1956,7 @@ def to_panel(self): | |||||
|
||||||
Returns | ||||||
------- | ||||||
panel : Panel | ||||||
Panel | ||||||
""" | ||||||
raise NotImplementedError("Panel is being removed in pandas 0.25.0.") | ||||||
|
||||||
|
@@ -2478,7 +2478,7 @@ def memory_usage(self, index=True, deep=False): | |||||
|
||||||
Returns | ||||||
------- | ||||||
sizes : Series | ||||||
Series | ||||||
A Series whose index is the original column names and whose values | ||||||
is the memory usage of each column in bytes. | ||||||
|
||||||
|
@@ -2696,7 +2696,7 @@ def get_value(self, index, col, takeable=False): | |||||
|
||||||
Returns | ||||||
------- | ||||||
value : scalar value | ||||||
scalar value | ||||||
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
|
||||||
""" | ||||||
|
||||||
warnings.warn("get_value is deprecated and will be removed " | ||||||
|
@@ -2741,9 +2741,9 @@ def set_value(self, index, col, value, takeable=False): | |||||
|
||||||
Returns | ||||||
------- | ||||||
frame : DataFrame | ||||||
DataFrame | ||||||
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 " | ||||||
|
@@ -3177,7 +3177,7 @@ def select_dtypes(self, include=None, exclude=None): | |||||
|
||||||
Returns | ||||||
------- | ||||||
subset : DataFrame | ||||||
DataFrame | ||||||
The subset of the frame including the dtypes in ``include`` and | ||||||
excluding the dtypes in ``exclude``. | ||||||
|
||||||
|
@@ -3542,7 +3542,7 @@ def _sanitize_column(self, key, value, broadcast=True): | |||||
|
||||||
Returns | ||||||
------- | ||||||
sanitized_column : numpy-array | ||||||
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
|
||||||
""" | ||||||
|
||||||
def reindexer(value): | ||||||
|
@@ -3811,7 +3811,7 @@ def drop(self, labels=None, axis=0, index=None, columns=None, | |||||
|
||||||
Returns | ||||||
------- | ||||||
dropped : pandas.DataFrame | ||||||
pandas.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
|
||||||
|
||||||
Raises | ||||||
------ | ||||||
|
@@ -3936,7 +3936,7 @@ def rename(self, *args, **kwargs): | |||||
|
||||||
Returns | ||||||
------- | ||||||
renamed : DataFrame | ||||||
DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -4579,7 +4579,7 @@ def drop_duplicates(self, subset=None, keep='first', inplace=False): | |||||
|
||||||
Returns | ||||||
------- | ||||||
deduplicated : DataFrame | ||||||
DataFrame | ||||||
""" | ||||||
if self.empty: | ||||||
return self.copy() | ||||||
|
@@ -4613,7 +4613,7 @@ def duplicated(self, subset=None, keep='first'): | |||||
|
||||||
Returns | ||||||
------- | ||||||
duplicated : Series | ||||||
Series | ||||||
""" | ||||||
from pandas.core.sorting import get_group_index | ||||||
from pandas._libs.hashtable import duplicated_int64, _SIZE_HINT_LIMIT | ||||||
|
@@ -4981,7 +4981,7 @@ def swaplevel(self, i=-2, j=-1, axis=0): | |||||
|
||||||
Returns | ||||||
------- | ||||||
swapped : same type as caller (new object) | ||||||
same type as caller (new object) | ||||||
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. Can you replace this by the Python type? I guess |
||||||
|
||||||
.. versionchanged:: 0.18.1 | ||||||
|
||||||
|
@@ -5260,7 +5260,7 @@ def combine_first(self, other): | |||||
|
||||||
Returns | ||||||
------- | ||||||
combined : DataFrame | ||||||
DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -5621,7 +5621,7 @@ def pivot(self, index=None, columns=None, values=None): | |||||
|
||||||
Returns | ||||||
------- | ||||||
table : DataFrame | ||||||
DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -5907,7 +5907,7 @@ def unstack(self, level=-1, fill_value=None): | |||||
|
||||||
Returns | ||||||
------- | ||||||
unstacked : DataFrame or Series | ||||||
DataFrame or 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
|
||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -6073,7 +6073,7 @@ def diff(self, periods=1, axis=0): | |||||
|
||||||
Returns | ||||||
------- | ||||||
diffed : DataFrame | ||||||
DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -6345,7 +6345,7 @@ def apply(self, func, axis=0, broadcast=None, raw=False, reduce=None, | |||||
|
||||||
Returns | ||||||
------- | ||||||
applied : Series or DataFrame | ||||||
Series or DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -6538,7 +6538,7 @@ def append(self, other, ignore_index=False, | |||||
|
||||||
Returns | ||||||
------- | ||||||
appended : DataFrame | ||||||
DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -6848,7 +6848,7 @@ def round(self, decimals=0, *args, **kwargs): | |||||
|
||||||
Returns | ||||||
------- | ||||||
DataFrame : | ||||||
DataFrame | ||||||
A DataFrame with the affected columns rounded to the specified | ||||||
number of decimal places. | ||||||
|
||||||
|
@@ -6961,7 +6961,7 @@ def corr(self, method='pearson', min_periods=1): | |||||
|
||||||
Returns | ||||||
------- | ||||||
y : DataFrame | ||||||
DataFrame | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -7155,7 +7155,7 @@ def corrwith(self, other, axis=0, drop=False, method='pearson'): | |||||
|
||||||
Returns | ||||||
------- | ||||||
correls : Series | ||||||
Series | ||||||
|
||||||
See Also | ||||||
------- | ||||||
|
@@ -7485,7 +7485,7 @@ def nunique(self, axis=0, dropna=True): | |||||
|
||||||
Returns | ||||||
------- | ||||||
nunique : Series | ||||||
Series | ||||||
|
||||||
See Also | ||||||
-------- | ||||||
|
@@ -7523,7 +7523,7 @@ def idxmin(self, axis=0, skipna=True): | |||||
|
||||||
Returns | ||||||
------- | ||||||
idxmin : Series | ||||||
Series | ||||||
|
||||||
Raises | ||||||
------ | ||||||
|
@@ -7559,7 +7559,7 @@ def idxmax(self, axis=0, skipna=True): | |||||
|
||||||
Returns | ||||||
------- | ||||||
idxmax : Series | ||||||
Series | ||||||
|
||||||
Raises | ||||||
------ | ||||||
|
@@ -7706,7 +7706,7 @@ def quantile(self, q=0.5, axis=0, numeric_only=True, | |||||
|
||||||
Returns | ||||||
------- | ||||||
quantiles : Series or DataFrame | ||||||
Series or DataFrame | ||||||
|
||||||
If ``q`` is an array, a DataFrame will be returned where the | ||||||
index is ``q``, the columns are the columns of self, and the | ||||||
|
@@ -7788,7 +7788,7 @@ def to_timestamp(self, freq=None, how='start', axis=0, copy=True): | |||||
|
||||||
Returns | ||||||
------- | ||||||
df : DataFrame with DatetimeIndex | ||||||
DataFrame with DatetimeIndex | ||||||
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. Can you leave just |
||||||
""" | ||||||
new_data = self._data | ||||||
if copy: | ||||||
|
@@ -7820,7 +7820,7 @@ def to_period(self, freq=None, axis=0, copy=True): | |||||
|
||||||
Returns | ||||||
------- | ||||||
ts : TimeSeries with PeriodIndex | ||||||
TimeSeries with PeriodIndex | ||||||
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 guess this returns a |
||||||
""" | ||||||
new_data = self._data | ||||||
if copy: | ||||||
|
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.