Skip to content

Commit 45cafb5

Browse files
authored
DOC: Remove unnecessary parentheses in :func: & :meth: role (#59663)
remove unnecessary parentheses in func & meth role from doc
1 parent 5593886 commit 45cafb5

14 files changed

+79
-79
lines changed

doc/source/user_guide/visualization.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ Plotting with error bars
15041504

15051505
Plotting with error bars is supported in :meth:`DataFrame.plot` and :meth:`Series.plot`.
15061506

1507-
Horizontal and vertical error bars can be supplied to the ``xerr`` and ``yerr`` keyword arguments to :meth:`~DataFrame.plot()`. The error values can be specified using a variety of formats:
1507+
Horizontal and vertical error bars can be supplied to the ``xerr`` and ``yerr`` keyword arguments to :meth:`~DataFrame.plot`. The error values can be specified using a variety of formats:
15081508

15091509
* As a :class:`DataFrame` or ``dict`` of errors with column names matching the ``columns`` attribute of the plotting :class:`DataFrame` or matching the ``name`` attribute of the :class:`Series`.
15101510
* As a ``str`` indicating which of the columns of plotting :class:`DataFrame` contain the error values.

doc/source/whatsnew/v0.15.0.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ Rolling/expanding moments improvements
490490
``ddof`` argument (with a default value of ``1``) was previously undocumented. (:issue:`8064`)
491491

492492
- :func:`ewma`, :func:`ewmstd`, :func:`ewmvol`, :func:`ewmvar`, :func:`ewmcov`, and :func:`ewmcorr`
493-
now interpret ``min_periods`` in the same manner that the :func:`rolling_*()` and :func:`expanding_*()` functions do:
493+
now interpret ``min_periods`` in the same manner that the :func:`rolling_*` and :func:`expanding_*` functions do:
494494
a given result entry will be ``NaN`` if the (expanding, in this case) window does not contain
495495
at least ``min_periods`` values. The previous behavior was to set to ``NaN`` the ``min_periods`` entries
496496
starting with the first non- ``NaN`` value. (:issue:`7977`)
@@ -567,7 +567,7 @@ Rolling/expanding moments improvements
567567
568568
.. warning::
569569

570-
By default (``ignore_na=False``) the :func:`ewm*()` functions' weights calculation
570+
By default (``ignore_na=False``) the :func:`ewm*` functions' weights calculation
571571
in the presence of missing values is different than in pre-0.15.0 versions.
572572
To reproduce the pre-0.15.0 calculation of weights in the presence of missing values
573573
one must specify explicitly ``ignore_na=True``.
@@ -576,7 +576,7 @@ Rolling/expanding moments improvements
576576
returning results with columns sorted by name and producing an error for non-unique columns;
577577
now handles non-unique columns and returns columns in original order
578578
(except for the case of two DataFrames with ``pairwise=False``, where behavior is unchanged) (:issue:`7542`)
579-
- Bug in :func:`rolling_count` and :func:`expanding_*()` functions unnecessarily producing error message for zero-length data (:issue:`8056`)
579+
- Bug in :func:`rolling_count` and :func:`expanding_*` functions unnecessarily producing error message for zero-length data (:issue:`8056`)
580580
- Bug in :func:`rolling_apply` and :func:`expanding_apply` interpreting ``min_periods=0`` as ``min_periods=1`` (:issue:`8080`)
581581
- Bug in :func:`expanding_std` and :func:`expanding_var` for a single value producing a confusing error message (:issue:`7900`)
582582
- Bug in :func:`rolling_std` and :func:`rolling_var` for a single value producing ``0`` rather than ``NaN`` (:issue:`7900`)
@@ -875,7 +875,7 @@ Other notable API changes:
875875
The behaviour of assigning a column to an existing dataframe as ``df['a'] = i``
876876
remains unchanged (this already returned an ``object`` column with a timezone).
877877

878-
- When passing multiple levels to :meth:`~pandas.DataFrame.stack()`, it will now raise a ``ValueError`` when the
878+
- When passing multiple levels to :meth:`~pandas.DataFrame.stack`, it will now raise a ``ValueError`` when the
879879
levels aren't all level names or all level numbers (:issue:`7660`). See
880880
:ref:`Reshaping by stacking and unstacking <reshaping.stack_multiple>`.
881881

@@ -1110,7 +1110,7 @@ Other:
11101110

11111111
- ``DataFrame.fillna`` can now accept a ``DataFrame`` as a fill value (:issue:`8377`)
11121112

1113-
- Passing multiple levels to :meth:`~pandas.DataFrame.stack()` will now work when multiple level
1113+
- Passing multiple levels to :meth:`~pandas.DataFrame.stack` will now work when multiple level
11141114
numbers are passed (:issue:`7660`). See
11151115
:ref:`Reshaping by stacking and unstacking <reshaping.stack_multiple>`.
11161116

doc/source/whatsnew/v0.15.1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Enhancements
263263

264264
- Raise errors in certain aggregation cases where an argument such as ``numeric_only`` is not handled (:issue:`8592`).
265265

266-
- Added support for 3-character ISO and non-standard country codes in :func:`io.wb.download()` (:issue:`8482`)
266+
- Added support for 3-character ISO and non-standard country codes in :func:`io.wb.download` (:issue:`8482`)
267267

268268
- World Bank data requests now will warn/raise based
269269
on an ``errors`` argument, as well as a list of hard-coded country codes and

doc/source/whatsnew/v0.21.0.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ New keywords
318318
- :func:`Series.set_axis` and :func:`DataFrame.set_axis` now support the ``inplace`` parameter. (:issue:`14636`)
319319
- :func:`Series.to_pickle` and :func:`DataFrame.to_pickle` have gained a ``protocol`` parameter (:issue:`16252`). By default, this parameter is set to `HIGHEST_PROTOCOL <https://docs.python.org/3/library/pickle.html#data-stream-format>`__
320320
- :func:`read_feather` has gained the ``nthreads`` parameter for multi-threaded operations (:issue:`16359`)
321-
- :func:`DataFrame.clip()` and :func:`Series.clip()` have gained an ``inplace`` argument. (:issue:`15388`)
321+
- :func:`DataFrame.clip` and :func:`Series.clip` have gained an ``inplace`` argument. (:issue:`15388`)
322322
- :func:`crosstab` has gained a ``margins_name`` parameter to define the name of the row / column that will contain the totals when ``margins=True``. (:issue:`15972`)
323323
- :func:`read_json` now accepts a ``chunksize`` parameter that can be used when ``lines=True``. If ``chunksize`` is passed, read_json now returns an iterator which reads in ``chunksize`` lines with each iteration. (:issue:`17048`)
324324
- :func:`read_json` and :func:`~DataFrame.to_json` now accept a ``compression`` argument which allows them to transparently handle compressed files. (:issue:`17798`)
@@ -977,10 +977,10 @@ Other API changes
977977
Deprecations
978978
~~~~~~~~~~~~
979979

980-
- :meth:`DataFrame.from_csv` and :meth:`Series.from_csv` have been deprecated in favor of :func:`read_csv()` (:issue:`4191`)
981-
- :func:`read_excel()` has deprecated ``sheetname`` in favor of ``sheet_name`` for consistency with ``.to_excel()`` (:issue:`10559`).
982-
- :func:`read_excel()` has deprecated ``parse_cols`` in favor of ``usecols`` for consistency with :func:`read_csv` (:issue:`4988`)
983-
- :func:`read_csv()` has deprecated the ``tupleize_cols`` argument. Column tuples will always be converted to a ``MultiIndex`` (:issue:`17060`)
980+
- :meth:`DataFrame.from_csv` and :meth:`Series.from_csv` have been deprecated in favor of :func:`read_csv` (:issue:`4191`)
981+
- :func:`read_excel` has deprecated ``sheetname`` in favor of ``sheet_name`` for consistency with ``.to_excel()`` (:issue:`10559`).
982+
- :func:`read_excel` has deprecated ``parse_cols`` in favor of ``usecols`` for consistency with :func:`read_csv` (:issue:`4988`)
983+
- :func:`read_csv` has deprecated the ``tupleize_cols`` argument. Column tuples will always be converted to a ``MultiIndex`` (:issue:`17060`)
984984
- :meth:`DataFrame.to_csv` has deprecated the ``tupleize_cols`` argument. MultiIndex columns will be always written as rows in the CSV file (:issue:`17060`)
985985
- The ``convert`` parameter has been deprecated in the ``.take()`` method, as it was not being respected (:issue:`16948`)
986986
- ``pd.options.html.border`` has been deprecated in favor of ``pd.options.display.html.border`` (:issue:`15793`).
@@ -1045,7 +1045,7 @@ return the position of the maximum or minimum.
10451045
Removal of prior version deprecations/changes
10461046
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10471047

1048-
- :func:`read_excel()` has dropped the ``has_index_names`` parameter (:issue:`10967`)
1048+
- :func:`read_excel` has dropped the ``has_index_names`` parameter (:issue:`10967`)
10491049
- The ``pd.options.display.height`` configuration has been dropped (:issue:`3663`)
10501050
- The ``pd.options.display.line_width`` configuration has been dropped (:issue:`2881`)
10511051
- The ``pd.options.display.mpl_style`` configuration has been dropped (:issue:`12190`)
@@ -1154,7 +1154,7 @@ GroupBy/resample/rolling
11541154

11551155
- Bug in ``DataFrame.resample(...).size()`` where an empty ``DataFrame`` did not return a ``Series`` (:issue:`14962`)
11561156
- Bug in :func:`infer_freq` causing indices with 2-day gaps during the working week to be wrongly inferred as business daily (:issue:`16624`)
1157-
- Bug in ``.rolling(...).quantile()`` which incorrectly used different defaults than :func:`Series.quantile()` and :func:`DataFrame.quantile()` (:issue:`9413`, :issue:`16211`)
1157+
- Bug in ``.rolling(...).quantile()`` which incorrectly used different defaults than :func:`Series.quantile` and :func:`DataFrame.quantile` (:issue:`9413`, :issue:`16211`)
11581158
- Bug in ``groupby.transform()`` that would coerce boolean dtypes back to float (:issue:`16875`)
11591159
- Bug in ``Series.resample(...).apply()`` where an empty ``Series`` modified the source index and did not return the name of a ``Series`` (:issue:`14313`)
11601160
- Bug in ``.rolling(...).apply(...)`` with a ``DataFrame`` with a ``DatetimeIndex``, a ``window`` of a timedelta-convertible and ``min_periods >= 1`` (:issue:`15305`)
@@ -1194,7 +1194,7 @@ Reshaping
11941194
Numeric
11951195
^^^^^^^
11961196
- Bug in ``.clip()`` with ``axis=1`` and a list-like for ``threshold`` is passed; previously this raised ``ValueError`` (:issue:`15390`)
1197-
- :func:`Series.clip()` and :func:`DataFrame.clip()` now treat NA values for upper and lower arguments as ``None`` instead of raising ``ValueError`` (:issue:`17276`).
1197+
- :func:`Series.clip` and :func:`DataFrame.clip` now treat NA values for upper and lower arguments as ``None`` instead of raising ``ValueError`` (:issue:`17276`).
11981198

11991199

12001200
Categorical

doc/source/whatsnew/v0.21.1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Categorical
176176
String
177177
^^^^^^
178178

179-
- :meth:`Series.str.split()` will now propagate ``NaN`` values across all expanded columns instead of ``None`` (:issue:`18450`)
179+
- :meth:`Series.str.split` will now propagate ``NaN`` values across all expanded columns instead of ``None`` (:issue:`18450`)
180180

181181

182182
.. _whatsnew_0.21.1.contributors:

doc/source/whatsnew/v0.23.0.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ Other enhancements
574574
- :func:`DataFrame.corrwith` now silently drops non-numeric columns when passed a Series. Before, an exception was raised (:issue:`18570`).
575575
- :class:`IntervalIndex` now supports time zone aware ``Interval`` objects (:issue:`18537`, :issue:`18538`)
576576
- :func:`Series` / :func:`DataFrame` tab completion also returns identifiers in the first level of a :func:`MultiIndex`. (:issue:`16326`)
577-
- :func:`read_excel()` has gained the ``nrows`` parameter (:issue:`16645`)
577+
- :func:`read_excel` has gained the ``nrows`` parameter (:issue:`16645`)
578578
- :meth:`DataFrame.append` can now in more cases preserve the type of the calling dataframe's columns (e.g. if both are ``CategoricalIndex``) (:issue:`18359`)
579579
- :meth:`DataFrame.to_json` and :meth:`Series.to_json` now accept an ``index`` argument which allows the user to exclude the index from the JSON output (:issue:`17394`)
580580
- ``IntervalIndex.to_tuples()`` has gained the ``na_tuple`` parameter to control whether NA is returned as a tuple of NA, or NA itself (:issue:`18756`)
@@ -1092,10 +1092,10 @@ Other API changes
10921092
- :func:`pandas.merge` now raises a ``ValueError`` when trying to merge on incompatible data types (:issue:`9780`)
10931093
- The default NA value for :class:`UInt64Index` has changed from 0 to ``NaN``, which impacts methods that mask with NA, such as ``UInt64Index.where()`` (:issue:`18398`)
10941094
- Refactored ``setup.py`` to use ``find_packages`` instead of explicitly listing out all subpackages (:issue:`18535`)
1095-
- Rearranged the order of keyword arguments in :func:`read_excel()` to align with :func:`read_csv()` (:issue:`16672`)
1095+
- Rearranged the order of keyword arguments in :func:`read_excel` to align with :func:`read_csv` (:issue:`16672`)
10961096
- :func:`wide_to_long` previously kept numeric-like suffixes as ``object`` dtype. Now they are cast to numeric if possible (:issue:`17627`)
10971097
- In :func:`read_excel`, the ``comment`` argument is now exposed as a named parameter (:issue:`18735`)
1098-
- Rearranged the order of keyword arguments in :func:`read_excel()` to align with :func:`read_csv()` (:issue:`16672`)
1098+
- Rearranged the order of keyword arguments in :func:`read_excel` to align with :func:`read_csv` (:issue:`16672`)
10991099
- The options ``html.border`` and ``mode.use_inf_as_null`` were deprecated in prior versions, these will now show ``FutureWarning`` rather than a ``DeprecationWarning`` (:issue:`19003`)
11001100
- :class:`IntervalIndex` and ``IntervalDtype`` no longer support categorical, object, and string subtypes (:issue:`19016`)
11011101
- ``IntervalDtype`` now returns ``True`` when compared against ``'interval'`` regardless of subtype, and ``IntervalDtype.name`` now returns ``'interval'`` regardless of subtype (:issue:`18980`)
@@ -1207,7 +1207,7 @@ Performance improvements
12071207
- ``Series`` construction will reduce the number of copies made of the input data in certain cases (:issue:`17449`)
12081208
- Improved performance of :func:`Series.dt.date` and :func:`DatetimeIndex.date` (:issue:`18058`)
12091209
- Improved performance of :func:`Series.dt.time` and :func:`DatetimeIndex.time` (:issue:`18461`)
1210-
- Improved performance of :func:`IntervalIndex.symmetric_difference()` (:issue:`18475`)
1210+
- Improved performance of :func:`IntervalIndex.symmetric_difference` (:issue:`18475`)
12111211
- Improved performance of ``DatetimeIndex`` and ``Series`` arithmetic operations with Business-Month and Business-Quarter frequencies (:issue:`18489`)
12121212
- :func:`Series` / :func:`DataFrame` tab completion limits to 100 values, for better performance. (:issue:`18587`)
12131213
- Improved performance of :func:`DataFrame.median` with ``axis=1`` when bottleneck is not installed (:issue:`16468`)
@@ -1326,7 +1326,7 @@ Timedelta
13261326
- Bug in :func:`Timedelta.__add__`, :func:`Timedelta.__sub__` where adding or subtracting a ``np.timedelta64`` object would return another ``np.timedelta64`` instead of a ``Timedelta`` (:issue:`19738`)
13271327
- Bug in :func:`Timedelta.__floordiv__`, :func:`Timedelta.__rfloordiv__` where operating with a ``Tick`` object would raise a ``TypeError`` instead of returning a numeric value (:issue:`19738`)
13281328
- Bug in :func:`Period.asfreq` where periods near ``datetime(1, 1, 1)`` could be converted incorrectly (:issue:`19643`, :issue:`19834`)
1329-
- Bug in :func:`Timedelta.total_seconds()` causing precision errors, for example ``Timedelta('30S').total_seconds()==30.000000000000004`` (:issue:`19458`)
1329+
- Bug in :func:`Timedelta.total_seconds` causing precision errors, for example ``Timedelta('30S').total_seconds()==30.000000000000004`` (:issue:`19458`)
13301330
- Bug in :func:`Timedelta.__rmod__` where operating with a ``numpy.timedelta64`` returned a ``timedelta64`` object instead of a ``Timedelta`` (:issue:`19820`)
13311331
- Multiplication of :class:`TimedeltaIndex` by ``TimedeltaIndex`` will now raise ``TypeError`` instead of raising ``ValueError`` in cases of length mismatch (:issue:`19333`)
13321332
- Bug in indexing a :class:`TimedeltaIndex` with a ``np.timedelta64`` object which was raising a ``TypeError`` (:issue:`20393`)
@@ -1430,12 +1430,12 @@ IO
14301430
- Bug in :func:`read_csv` where missing values were not being handled properly when ``keep_default_na=False`` with dictionary ``na_values`` (:issue:`19227`)
14311431
- Bug in :func:`read_csv` causing heap corruption on 32-bit, big-endian architectures (:issue:`20785`)
14321432
- Bug in :func:`read_sas` where a file with 0 variables gave an ``AttributeError`` incorrectly. Now it gives an ``EmptyDataError`` (:issue:`18184`)
1433-
- Bug in :func:`DataFrame.to_latex()` where pairs of braces meant to serve as invisible placeholders were escaped (:issue:`18667`)
1434-
- Bug in :func:`DataFrame.to_latex()` where a ``NaN`` in a ``MultiIndex`` would cause an ``IndexError`` or incorrect output (:issue:`14249`)
1435-
- Bug in :func:`DataFrame.to_latex()` where a non-string index-level name would result in an ``AttributeError`` (:issue:`19981`)
1436-
- Bug in :func:`DataFrame.to_latex()` where the combination of an index name and the ``index_names=False`` option would result in incorrect output (:issue:`18326`)
1437-
- Bug in :func:`DataFrame.to_latex()` where a ``MultiIndex`` with an empty string as its name would result in incorrect output (:issue:`18669`)
1438-
- Bug in :func:`DataFrame.to_latex()` where missing space characters caused wrong escaping and produced non-valid latex in some cases (:issue:`20859`)
1433+
- Bug in :func:`DataFrame.to_latex` where pairs of braces meant to serve as invisible placeholders were escaped (:issue:`18667`)
1434+
- Bug in :func:`DataFrame.to_latex` where a ``NaN`` in a ``MultiIndex`` would cause an ``IndexError`` or incorrect output (:issue:`14249`)
1435+
- Bug in :func:`DataFrame.to_latex` where a non-string index-level name would result in an ``AttributeError`` (:issue:`19981`)
1436+
- Bug in :func:`DataFrame.to_latex` where the combination of an index name and the ``index_names=False`` option would result in incorrect output (:issue:`18326`)
1437+
- Bug in :func:`DataFrame.to_latex` where a ``MultiIndex`` with an empty string as its name would result in incorrect output (:issue:`18669`)
1438+
- Bug in :func:`DataFrame.to_latex` where missing space characters caused wrong escaping and produced non-valid latex in some cases (:issue:`20859`)
14391439
- Bug in :func:`read_json` where large numeric values were causing an ``OverflowError`` (:issue:`18842`)
14401440
- Bug in :func:`DataFrame.to_parquet` where an exception was raised if the write destination is S3 (:issue:`19134`)
14411441
- :class:`Interval` now supported in :func:`DataFrame.to_excel` for all Excel file types (:issue:`19242`)

doc/source/whatsnew/v0.23.1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Bug fixes
106106

107107
**Data-type specific**
108108

109-
- Bug in :meth:`Series.str.replace()` where the method throws ``TypeError`` on Python 3.5.2 (:issue:`21078`)
109+
- Bug in :meth:`Series.str.replace` where the method throws ``TypeError`` on Python 3.5.2 (:issue:`21078`)
110110
- Bug in :class:`Timedelta` where passing a float with a unit would prematurely round the float precision (:issue:`14156`)
111111
- Bug in :func:`pandas.testing.assert_index_equal` which raised ``AssertionError`` incorrectly, when comparing two :class:`CategoricalIndex` objects with param ``check_categorical=False`` (:issue:`19776`)
112112

0 commit comments

Comments
 (0)