Skip to content

Commit 1265c27

Browse files
DOC: some rst fixes (#16763)
1 parent 9c9d5fb commit 1265c27

File tree

5 files changed

+19
-18
lines changed

5 files changed

+19
-18
lines changed

doc/source/groupby.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1200,14 +1200,14 @@ Regroup columns of a DataFrame according to their sum, and sum the aggregated on
12001200
df
12011201
df.groupby(df.sum(), axis=1).sum()
12021202
1203-
.. _groupby.multicolumn_factorization
1203+
.. _groupby.multicolumn_factorization:
12041204

12051205
Multi-column factorization
12061206
~~~~~~~~~~~~~~~~~~~~~~~~~~
12071207

12081208
By using ``.ngroup()``, we can extract information about the groups in
12091209
a way similar to :func:`factorize` (as described further in the
1210-
:ref:`reshaping API <reshaping.factorization>`) but which applies
1210+
:ref:`reshaping API <reshaping.factorize>`) but which applies
12111211
naturally to multiple columns of mixed type and different
12121212
sources. This can be useful as an intermediate categorical-like step
12131213
in processing, when the relationships between the group rows are more

pandas/core/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ def to_hdf(self, path_or_buf, key, **kwargs):
12921292
As of v0.20.2 these additional compressors for Blosc are supported
12931293
(default if no compressor specified: 'blosc:blosclz'):
12941294
{'blosc:blosclz', 'blosc:lz4', 'blosc:lz4hc', 'blosc:snappy',
1295-
'blosc:zlib', 'blosc:zstd'}.
1295+
'blosc:zlib', 'blosc:zstd'}.
12961296
Specifying a compression library which is not available issues
12971297
a ValueError.
12981298
fletcher32 : bool, default False

pandas/core/groupby.py

-2
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,6 @@ def ohlc(self):
12121212
lambda x: x._cython_agg_general('ohlc'))
12131213

12141214
@Appender(DataFrame.describe.__doc__)
1215-
@Substitution(name='groupby')
1216-
@Appender(_doc_template)
12171215
def describe(self, **kwargs):
12181216
self._set_group_selection()
12191217
result = self.apply(lambda x: x.describe(**kwargs))

pandas/core/series.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,8 @@ def argsort(self, axis=0, kind='quicksort', order=None):
18471847
dtype='int64').__finalize__(self)
18481848

18491849
def nlargest(self, n=5, keep='first'):
1850-
"""Return the largest `n` elements.
1850+
"""
1851+
Return the largest `n` elements.
18511852
18521853
Parameters
18531854
----------
@@ -1893,7 +1894,8 @@ def nlargest(self, n=5, keep='first'):
18931894
return algorithms.SelectNSeries(self, n=n, keep=keep).nlargest()
18941895

18951896
def nsmallest(self, n=5, keep='first'):
1896-
"""Return the smallest `n` elements.
1897+
"""
1898+
Return the smallest `n` elements.
18971899
18981900
Parameters
18991901
----------

pandas/io/parsers.py

+12-11
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
Additional strings to recognize as NA/NaN. If dict passed, specific
153153
per-column NA values. By default the following values are interpreted as
154154
NaN: '""" + fill("', '".join(sorted(_NA_VALUES)),
155-
70, subsequent_indent=" ") + """'`.
155+
70, subsequent_indent=" ") + """'.
156156
keep_default_na : bool, default True
157157
If na_values are specified and keep_default_na is False the default NaN
158158
values are overridden, otherwise they're appended to.
@@ -181,22 +181,23 @@
181181
182182
Note: A fast-path exists for iso8601-formatted dates.
183183
infer_datetime_format : boolean, default False
184-
If True and parse_dates is enabled, pandas will attempt to infer the format
185-
of the datetime strings in the columns, and if it can be inferred, switch
186-
to a faster method of parsing them. In some cases this can increase the
187-
parsing speed by 5-10x.
184+
If True and `parse_dates` is enabled, pandas will attempt to infer the
185+
format of the datetime strings in the columns, and if it can be inferred,
186+
switch to a faster method of parsing them. In some cases this can increase
187+
the parsing speed by 5-10x.
188188
keep_date_col : boolean, default False
189-
If True and parse_dates specifies combining multiple columns then
189+
If True and `parse_dates` specifies combining multiple columns then
190190
keep the original columns.
191191
date_parser : function, default None
192192
Function to use for converting a sequence of string columns to an array of
193193
datetime instances. The default uses ``dateutil.parser.parser`` to do the
194-
conversion. Pandas will try to call date_parser in three different ways,
194+
conversion. Pandas will try to call `date_parser` in three different ways,
195195
advancing to the next if an exception occurs: 1) Pass one or more arrays
196-
(as defined by parse_dates) as arguments; 2) concatenate (row-wise) the
197-
string values from the columns defined by parse_dates into a single array
198-
and pass that; and 3) call date_parser once for each row using one or more
199-
strings (corresponding to the columns defined by parse_dates) as arguments.
196+
(as defined by `parse_dates`) as arguments; 2) concatenate (row-wise) the
197+
string values from the columns defined by `parse_dates` into a single array
198+
and pass that; and 3) call `date_parser` once for each row using one or
199+
more strings (corresponding to the columns defined by `parse_dates`) as
200+
arguments.
200201
dayfirst : boolean, default False
201202
DD/MM format dates, international and European format
202203
iterator : boolean, default False

0 commit comments

Comments
 (0)