Skip to content

Commit a0fa2c7

Browse files
committed
Update
1 parent e0d8470 commit a0fa2c7

File tree

11 files changed

+36
-29
lines changed

11 files changed

+36
-29
lines changed

ci/code_checks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ fi
240240
### DOCSTRINGS ###
241241
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
242242

243-
MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, EX04)' ; echo $MSG
244-
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04
243+
MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, EX04, SS05)' ; echo $MSG
244+
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR05,EX04, SS05
245245
RET=$(($RET + $?)) ; echo $MSG "DONE"
246246

247247
fi

pandas/core/dtypes/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ def _validate_date_like_dtype(dtype):
19801980

19811981
def pandas_dtype(dtype):
19821982
"""
1983-
Converts input into a pandas only dtype object or a numpy dtype object.
1983+
Convert input into a pandas only dtype object or a numpy dtype object.
19841984
19851985
Parameters
19861986
----------

pandas/core/generic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10127,7 +10127,8 @@ def nanptp(values, axis=0, skipna=True):
1012710127

1012810128
cls.ptp = _make_stat_function(
1012910129
cls, 'ptp', name, name2, axis_descr,
10130-
"""Returns the difference between the maximum value and the
10130+
"""
10131+
Return the difference between the maximum value and the
1013110132
minimum value in the object. This is the equivalent of the
1013210133
``numpy.ndarray`` method ``ptp``.\n\n.. deprecated:: 0.24.0
1013310134
Use numpy.ptp instead""",

pandas/core/indexes/category.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def _is_dtype_compat(self, other):
232232

233233
def equals(self, other):
234234
"""
235-
Determines if two CategorialIndex objects contain the same elements.
235+
Determine if two CategorialIndex objects contain the same elements.
236236
"""
237237
if self.is_(other):
238238
return True

pandas/core/indexes/datetimes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ def delete(self, loc):
12841284

12851285
def indexer_at_time(self, time, asof=False):
12861286
"""
1287-
Returns index locations of index values at particular time of day
1287+
Return index locations of index values at particular time of day
12881288
(e.g. 9:30AM).
12891289
12901290
Parameters

pandas/core/ops.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def _get_op_name(op, special):
447447
_op_descriptions[reverse_op]['reverse'] = key
448448

449449
_flex_doc_SERIES = """
450-
{desc} of series and other, element-wise (binary operator `{op_name}`).
450+
Generate {desc} of series and other, element-wise (binary operator `{op_name}`).
451451
452452
Equivalent to ``{equiv}``, but with support to substitute a fill_value for
453453
missing data in one of the inputs.
@@ -525,7 +525,7 @@ def _get_op_name(op, special):
525525
"""
526526

527527
_flex_doc_FRAME = """
528-
{desc} of dataframe and other, element-wise (binary operator `{op_name}`).
528+
Generate {desc} of dataframe and other, element-wise (binary operator `{op_name}`).
529529
530530
Equivalent to ``{equiv}``, but with support to substitute a fill_value
531531
for missing data in one of the inputs. With reverse version, `{reverse}`.
@@ -679,7 +679,7 @@ def _get_op_name(op, special):
679679
"""
680680

681681
_flex_comp_doc_FRAME = """
682-
{desc} of dataframe and other, element-wise (binary operator `{op_name}`).
682+
Generate {desc} of dataframe and other, element-wise (binary operator `{op_name}`).
683683
684684
Among flexible wrappers (`eq`, `ne`, `le`, `lt`, `ge`, `gt`) to comparison
685685
operators.
@@ -825,7 +825,7 @@ def _get_op_name(op, special):
825825
"""
826826

827827
_flex_doc_PANEL = """
828-
{desc} of series and other, element-wise (binary operator `{op_name}`).
828+
Generate {desc} of series and other, element-wise (binary operator `{op_name}`).
829829
Equivalent to ``{equiv}``.
830830
831831
Parameters

pandas/core/strings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2869,7 +2869,7 @@ def rindex(self, sub, start=0, end=None):
28692869
return self._wrap_result(result)
28702870

28712871
_shared_docs['len'] = ("""
2872-
Computes the length of each element in the Series/Index. The element may be
2872+
Compute the length of each element in the Series/Index. The element may be
28732873
a sequence (such as a string, tuple or list) or a collection
28742874
(such as a dictionary).
28752875

pandas/core/window.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ def aggregate(self, arg, *args, **kwargs):
438438

439439
class Window(_Window):
440440
"""
441-
Provides rolling window calculations.
441+
Provide rolling window calculations.
442442
443443
.. versionadded:: 0.18.0
444444
@@ -1803,7 +1803,7 @@ def corr(self, other=None, pairwise=None, **kwargs):
18031803

18041804
class RollingGroupby(_GroupByMixin, Rolling):
18051805
"""
1806-
Provides a rolling groupby implementation.
1806+
Provide a rolling groupby implementation.
18071807
18081808
.. versionadded:: 0.18.1
18091809
@@ -1834,7 +1834,7 @@ def _validate_monotonic(self):
18341834

18351835
class Expanding(_Rolling_and_Expanding):
18361836
"""
1837-
Provides expanding transformations.
1837+
Provide expanding transformations.
18381838
18391839
.. versionadded:: 0.18.0
18401840
@@ -2076,7 +2076,7 @@ def corr(self, other=None, pairwise=None, **kwargs):
20762076

20772077
class ExpandingGroupby(_GroupByMixin, Expanding):
20782078
"""
2079-
Provides a expanding groupby implementation.
2079+
Provide a expanding groupby implementation.
20802080
20812081
.. versionadded:: 0.18.1
20822082

pandas/io/stata.py

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
_iterator_params)
120120

121121
_data_method_doc = """\
122-
Reads observations from Stata file, converting them into a dataframe
122+
Read observations from Stata file, converting them into a dataframe
123123
124124
.. deprecated::
125125
This is a legacy method. Use `read` in new code.
@@ -1726,18 +1726,22 @@ def _do_convert_categoricals(self, data, value_label_dict, lbllist,
17261726
return data
17271727

17281728
def data_label(self):
1729-
"""Returns data label of Stata file"""
1729+
"""
1730+
Return data label of Stata file.
1731+
"""
17301732
return self.data_label
17311733

17321734
def variable_labels(self):
1733-
"""Returns variable labels as a dict, associating each variable name
1734-
with corresponding label
1735+
"""
1736+
Return variable labels as a dict, associating each variable name
1737+
with corresponding label.
17351738
"""
17361739
return dict(zip(self.varlist, self._variable_labels))
17371740

17381741
def value_labels(self):
1739-
"""Returns a dict, associating each variable name a dict, associating
1740-
each value its corresponding label
1742+
"""
1743+
Return a dict, associating each variable name a dict, associating
1744+
each value its corresponding label.
17411745
"""
17421746
if not self._value_labels_read:
17431747
self._read_value_labels()
@@ -1747,7 +1751,7 @@ def value_labels(self):
17471751

17481752
def _open_file_binary_write(fname):
17491753
"""
1750-
Open a binary file or no-op if file-like
1754+
Open a binary file or no-op if file-like.
17511755
17521756
Parameters
17531757
----------
@@ -1778,14 +1782,14 @@ def _set_endianness(endianness):
17781782

17791783
def _pad_bytes(name, length):
17801784
"""
1781-
Takes a char string and pads it with null bytes until it's length chars
1785+
Take a char string and pads it with null bytes until it's length chars.
17821786
"""
17831787
return name + "\x00" * (length - len(name))
17841788

17851789

17861790
def _convert_datetime_to_stata_type(fmt):
17871791
"""
1788-
Converts from one of the stata date formats to a type in TYPE_MAP
1792+
Convert from one of the stata date formats to a type in TYPE_MAP.
17891793
"""
17901794
if fmt in ["tc", "%tc", "td", "%td", "tw", "%tw", "tm", "%tm", "tq",
17911795
"%tq", "th", "%th", "ty", "%ty"]:
@@ -1812,7 +1816,7 @@ def _maybe_convert_to_int_keys(convert_dates, varlist):
18121816

18131817
def _dtype_to_stata_type(dtype, column):
18141818
"""
1815-
Converts dtype types to stata types. Returns the byte of the given ordinal.
1819+
Convert dtype types to stata types. Returns the byte of the given ordinal.
18161820
See TYPE_MAP and comments for an explanation. This is also explained in
18171821
the dta spec.
18181822
1 - 244 are strings of this length
@@ -1850,7 +1854,7 @@ def _dtype_to_stata_type(dtype, column):
18501854
def _dtype_to_default_stata_fmt(dtype, column, dta_version=114,
18511855
force_strl=False):
18521856
"""
1853-
Maps numpy dtype to stata's default format for this type. Not terribly
1857+
Map numpy dtype to stata's default format for this type. Not terribly
18541858
important since users can change this in Stata. Semantics are
18551859
18561860
object -> "%DDs" where DD is the length of the string. If not a string,

pandas/plotting/_misc.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def normalize(series):
273273
def andrews_curves(frame, class_column, ax=None, samples=200, color=None,
274274
colormap=None, **kwds):
275275
"""
276-
Generates a matplotlib plot of Andrews curves, for visualising clusters of
276+
Generate a matplotlib plot of Andrews curves, for visualising clusters of
277277
multivariate data.
278278
279279
Andrews curves have the functional form:
@@ -598,7 +598,8 @@ def lag_plot(series, lag=1, ax=None, **kwds):
598598

599599

600600
def autocorrelation_plot(series, ax=None, **kwds):
601-
"""Autocorrelation plot for time series.
601+
"""
602+
Autocorrelation plot for time series.
602603
603604
Parameters:
604605
-----------

pandas/util/_decorators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99

1010
def deprecate(name, alternative, version, alt_name=None,
1111
klass=None, stacklevel=2, msg=None):
12-
"""Return a new function that emits a deprecation warning on use.
12+
"""
13+
Return a new function that emits a deprecation warning on use.
1314
1415
To use this method for a deprecated function, another function
1516
`alternative` with the same signature must exist. The deprecated

0 commit comments

Comments
 (0)