Skip to content

Commit 8738635

Browse files
authored
DOC: Remove explicit paths from references (pandas-dev#55555)
* DOC: Remove explicit paths from references * revert
1 parent bd5455e commit 8738635

22 files changed

+107
-108
lines changed

doc/source/getting_started/comparison/comparison_with_sql.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -164,24 +164,24 @@ The pandas equivalent would be:
164164
165165
tips.groupby("sex").size()
166166
167-
Notice that in the pandas code we used :meth:`~pandas.core.groupby.DataFrameGroupBy.size` and not
168-
:meth:`~pandas.core.groupby.DataFrameGroupBy.count`. This is because
169-
:meth:`~pandas.core.groupby.DataFrameGroupBy.count` applies the function to each column, returning
167+
Notice that in the pandas code we used :meth:`.DataFrameGroupBy.size` and not
168+
:meth:`.DataFrameGroupBy.count`. This is because
169+
:meth:`.DataFrameGroupBy.count` applies the function to each column, returning
170170
the number of ``NOT NULL`` records within each.
171171

172172
.. ipython:: python
173173
174174
tips.groupby("sex").count()
175175
176-
Alternatively, we could have applied the :meth:`~pandas.core.groupby.DataFrameGroupBy.count` method
176+
Alternatively, we could have applied the :meth:`.DataFrameGroupBy.count` method
177177
to an individual column:
178178

179179
.. ipython:: python
180180
181181
tips.groupby("sex")["total_bill"].count()
182182
183183
Multiple functions can also be applied at once. For instance, say we'd like to see how tip amount
184-
differs by day of the week - :meth:`~pandas.core.groupby.DataFrameGroupBy.agg` allows you to pass a dictionary
184+
differs by day of the week - :meth:`.DataFrameGroupBy.agg` allows you to pass a dictionary
185185
to your grouped DataFrame, indicating which functions to apply to specific columns.
186186

187187
.. code-block:: sql

doc/source/user_guide/10min.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ See the :ref:`Grouping section <groupby>`.
525525
df
526526
527527
Grouping by a column label, selecting column labels, and then applying the
528-
:meth:`~pandas.core.groupby.DataFrameGroupBy.sum` function to the resulting
528+
:meth:`.DataFrameGroupBy.sum` function to the resulting
529529
groups:
530530

531531
.. ipython:: python

doc/source/user_guide/enhancingperf.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ by evaluate arithmetic and boolean expression all at once for large :class:`~pan
453453
:func:`~pandas.eval` is many orders of magnitude slower for
454454
smaller expressions or objects than plain Python. A good rule of thumb is
455455
to only use :func:`~pandas.eval` when you have a
456-
:class:`~pandas.core.frame.DataFrame` with more than 10,000 rows.
456+
:class:`.DataFrame` with more than 10,000 rows.
457457

458458
Supported syntax
459459
~~~~~~~~~~~~~~~~

doc/source/user_guide/groupby.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ Selecting a group
458458
-----------------
459459

460460
A single group can be selected using
461-
:meth:`~pandas.core.groupby.DataFrameGroupBy.get_group`:
461+
:meth:`.DataFrameGroupBy.get_group`:
462462

463463
.. ipython:: python
464464
@@ -1531,7 +1531,7 @@ Enumerate groups
15311531

15321532
To see the ordering of the groups (as opposed to the order of rows
15331533
within a group given by ``cumcount``) you can use
1534-
:meth:`~pandas.core.groupby.DataFrameGroupBy.ngroup`.
1534+
:meth:`.DataFrameGroupBy.ngroup`.
15351535

15361536

15371537

@@ -1660,7 +1660,7 @@ Regroup columns of a DataFrame according to their sum, and sum the aggregated on
16601660
Multi-column factorization
16611661
~~~~~~~~~~~~~~~~~~~~~~~~~~
16621662

1663-
By using :meth:`~pandas.core.groupby.DataFrameGroupBy.ngroup`, we can extract
1663+
By using :meth:`.DataFrameGroupBy.ngroup`, we can extract
16641664
information about the groups in a way similar to :func:`factorize` (as described
16651665
further in the :ref:`reshaping API <reshaping.factorize>`) but which applies
16661666
naturally to multiple columns of mixed type and different

doc/source/user_guide/io.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2701,7 +2701,7 @@ in the method ``to_string`` described above.
27012701
.. note::
27022702

27032703
Not all of the possible options for ``DataFrame.to_html`` are shown here for
2704-
brevity's sake. See :func:`~pandas.core.frame.DataFrame.to_html` for the
2704+
brevity's sake. See :func:`.DataFrame.to_html` for the
27052705
full set of options.
27062706

27072707
.. note::
@@ -6020,7 +6020,7 @@ Stata format
60206020
Writing to stata format
60216021
'''''''''''''''''''''''
60226022

6023-
The method :func:`~pandas.core.frame.DataFrame.to_stata` will write a DataFrame
6023+
The method :func:`.DataFrame.to_stata` will write a DataFrame
60246024
into a .dta file. The format version of this file is always 115 (Stata 12).
60256025

60266026
.. ipython:: python
@@ -6060,7 +6060,7 @@ outside of this range, the variable is cast to ``int16``.
60606060
.. warning::
60616061

60626062
:class:`~pandas.io.stata.StataWriter` and
6063-
:func:`~pandas.core.frame.DataFrame.to_stata` only support fixed width
6063+
:func:`.DataFrame.to_stata` only support fixed width
60646064
strings containing up to 244 characters, a limitation imposed by the version
60656065
115 dta file format. Attempting to write *Stata* dta files with strings
60666066
longer than 244 characters raises a ``ValueError``.

doc/source/whatsnew/v0.17.1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ We've added *experimental* support for conditional HTML formatting:
4343
the visual styling of a DataFrame based on the data.
4444
The styling is accomplished with HTML and CSS.
4545
Accesses the styler class with the :attr:`pandas.DataFrame.style`, attribute,
46-
an instance of :class:`~pandas.core.style.Styler` with your data attached.
46+
an instance of :class:`.Styler` with your data attached.
4747

4848
Here's a quick example:
4949

@@ -58,7 +58,7 @@ We can render the HTML to get the following table.
5858
.. raw:: html
5959
:file: whatsnew_0171_html_table.html
6060

61-
:class:`~pandas.core.style.Styler` interacts nicely with the Jupyter Notebook.
61+
:class:`.Styler` interacts nicely with the Jupyter Notebook.
6262
See the :ref:`documentation </user_guide/style.ipynb>` for more.
6363

6464
.. _whatsnew_0171.enhancements:

doc/source/whatsnew/v0.20.2.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Enhancements
2828
- Unblocked access to additional compression types supported in pytables: 'blosc:blosclz, 'blosc:lz4', 'blosc:lz4hc', 'blosc:snappy', 'blosc:zlib', 'blosc:zstd' (:issue:`14478`)
2929
- ``Series`` provides a ``to_latex`` method (:issue:`16180`)
3030

31-
- A new groupby method :meth:`~pandas.core.groupby.GroupBy.ngroup`,
32-
parallel to the existing :meth:`~pandas.core.groupby.GroupBy.cumcount`,
31+
- A new groupby method :meth:`.GroupBy.ngroup`,
32+
parallel to the existing :meth:`.GroupBy.cumcount`,
3333
has been added to return the group order (:issue:`11642`); see
3434
:ref:`here <groupby.ngroup>`.
3535

doc/source/whatsnew/v0.21.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ Other enhancements
306306
New functions or methods
307307
""""""""""""""""""""""""
308308

309-
- :meth:`~pandas.core.resample.Resampler.nearest` is added to support nearest-neighbor upsampling (:issue:`17496`).
309+
- :meth:`.Resampler.nearest` is added to support nearest-neighbor upsampling (:issue:`17496`).
310310
- :class:`~pandas.Index` has added support for a ``to_frame`` method (:issue:`15230`).
311311

312312
New keywords

doc/source/whatsnew/v0.23.0.rst

+14-15
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ For pivoting operations, this behavior is *already* controlled by the ``dropna``
299299
Rolling/Expanding.apply() accepts ``raw=False`` to pass a ``Series`` to the function
300300
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
301301

302-
:func:`Series.rolling().apply() <pandas.core.window.Rolling.apply>`, :func:`DataFrame.rolling().apply() <pandas.core.window.Rolling.apply>`,
303-
:func:`Series.expanding().apply() <pandas.core.window.Expanding.apply>`, and :func:`DataFrame.expanding().apply() <pandas.core.window.Expanding.apply>` have gained a ``raw=None`` parameter.
302+
:func:`Series.rolling().apply() <.Rolling.apply>`, :func:`DataFrame.rolling().apply() <.Rolling.apply>`,
303+
:func:`Series.expanding().apply() <.Expanding.apply>`, and :func:`DataFrame.expanding().apply() <.Expanding.apply>` have gained a ``raw=None`` parameter.
304304
This is similar to :func:`DataFame.apply`. This parameter, if ``True`` allows one to send a ``np.ndarray`` to the applied function. If ``False`` a ``Series`` will be passed. The
305305
default is ``None``, which preserves backward compatibility, so this will default to ``True``, sending an ``np.ndarray``.
306306
In a future version the default will be changed to ``False``, sending a ``Series``. (:issue:`5071`, :issue:`20584`)
@@ -524,7 +524,7 @@ Other enhancements
524524
- ``Categorical.rename_categories``, ``CategoricalIndex.rename_categories`` and :attr:`Series.cat.rename_categories`
525525
can now take a callable as their argument (:issue:`18862`)
526526
- :class:`Interval` and :class:`IntervalIndex` have gained a ``length`` attribute (:issue:`18789`)
527-
- ``Resampler`` objects now have a functioning :attr:`~pandas.core.resample.Resampler.pipe` method.
527+
- ``Resampler`` objects now have a functioning :attr:`.Resampler.pipe` method.
528528
Previously, calls to ``pipe`` were diverted to the ``mean`` method (:issue:`17905`).
529529
- :func:`~pandas.api.types.is_scalar` now returns ``True`` for ``DateOffset`` objects (:issue:`18943`).
530530
- :func:`DataFrame.pivot` now accepts a list for the ``values=`` kwarg (:issue:`17160`).
@@ -536,7 +536,7 @@ Other enhancements
536536

537537
- ``IntervalIndex.astype`` now supports conversions between subtypes when passed an ``IntervalDtype`` (:issue:`19197`)
538538
- :class:`IntervalIndex` and its associated constructor methods (``from_arrays``, ``from_breaks``, ``from_tuples``) have gained a ``dtype`` parameter (:issue:`19262`)
539-
- Added :func:`pandas.core.groupby.SeriesGroupBy.is_monotonic_increasing` and :func:`pandas.core.groupby.SeriesGroupBy.is_monotonic_decreasing` (:issue:`17015`)
539+
- Added :func:`.SeriesGroupBy.is_monotonic_increasing` and :func:`.SeriesGroupBy.is_monotonic_decreasing` (:issue:`17015`)
540540
- For subclassed ``DataFrames``, :func:`DataFrame.apply` will now preserve the ``Series`` subclass (if defined) when passing the data to the applied function (:issue:`19822`)
541541
- :func:`DataFrame.from_dict` now accepts a ``columns`` argument that can be used to specify the column names when ``orient='index'`` is used (:issue:`18529`)
542542
- Added option ``display.html.use_mathjax`` so `MathJax <https://www.mathjax.org/>`_ can be disabled when rendering tables in ``Jupyter`` notebooks (:issue:`19856`, :issue:`19824`)
@@ -547,7 +547,7 @@ Other enhancements
547547
``SQLAlchemy`` dialects supporting multi-value inserts include: ``mysql``, ``postgresql``, ``sqlite`` and any dialect with ``supports_multivalues_insert``. (:issue:`14315`, :issue:`8953`)
548548
- :func:`read_html` now accepts a ``displayed_only`` keyword argument to controls whether or not hidden elements are parsed (``True`` by default) (:issue:`20027`)
549549
- :func:`read_html` now reads all ``<tbody>`` elements in a ``<table>``, not just the first. (:issue:`20690`)
550-
- :meth:`~pandas.core.window.Rolling.quantile` and :meth:`~pandas.core.window.Expanding.quantile` now accept the ``interpolation`` keyword, ``linear`` by default (:issue:`20497`)
550+
- :meth:`.Rolling.quantile` and :meth:`.Expanding.quantile` now accept the ``interpolation`` keyword, ``linear`` by default (:issue:`20497`)
551551
- zip compression is supported via ``compression=zip`` in :func:`DataFrame.to_pickle`, :func:`Series.to_pickle`, :func:`DataFrame.to_csv`, :func:`Series.to_csv`, :func:`DataFrame.to_json`, :func:`Series.to_json`. (:issue:`17778`)
552552
- :class:`~pandas.tseries.offsets.WeekOfMonth` constructor now supports ``n=0`` (:issue:`20517`).
553553
- :class:`DataFrame` and :class:`Series` now support matrix multiplication (``@``) operator (:issue:`10259`) for Python>=3.5
@@ -1052,7 +1052,7 @@ Other API changes
10521052
- :func:`DatetimeIndex.strftime` and :func:`PeriodIndex.strftime` now return an ``Index`` instead of a numpy array to be consistent with similar accessors (:issue:`20127`)
10531053
- Constructing a Series from a list of length 1 no longer broadcasts this list when a longer index is specified (:issue:`19714`, :issue:`20391`).
10541054
- :func:`DataFrame.to_dict` with ``orient='index'`` no longer casts int columns to float for a DataFrame with only int and float columns (:issue:`18580`)
1055-
- A user-defined-function that is passed to :func:`Series.rolling().aggregate() <pandas.core.window.Rolling.aggregate>`, :func:`DataFrame.rolling().aggregate() <pandas.core.window.Rolling.aggregate>`, or its expanding cousins, will now *always* be passed a ``Series``, rather than a ``np.array``; ``.apply()`` only has the ``raw`` keyword, see :ref:`here <whatsnew_0230.enhancements.window_raw>`. This is consistent with the signatures of ``.aggregate()`` across pandas (:issue:`20584`)
1055+
- A user-defined-function that is passed to :func:`Series.rolling().aggregate() <.Rolling.aggregate>`, :func:`DataFrame.rolling().aggregate() <.Rolling.aggregate>`, or its expanding cousins, will now *always* be passed a ``Series``, rather than a ``np.array``; ``.apply()`` only has the ``raw`` keyword, see :ref:`here <whatsnew_0230.enhancements.window_raw>`. This is consistent with the signatures of ``.aggregate()`` across pandas (:issue:`20584`)
10561056
- Rolling and Expanding types raise ``NotImplementedError`` upon iteration (:issue:`11704`).
10571057

10581058
.. _whatsnew_0230.deprecations:
@@ -1084,8 +1084,7 @@ Deprecations
10841084
- ``Index.summary()`` is deprecated and will be removed in a future version (:issue:`18217`)
10851085
- ``NDFrame.get_ftype_counts()`` is deprecated and will be removed in a future version (:issue:`18243`)
10861086
- The ``convert_datetime64`` parameter in :func:`DataFrame.to_records` has been deprecated and will be removed in a future version. The NumPy bug motivating this parameter has been resolved. The default value for this parameter has also changed from ``True`` to ``None`` (:issue:`18160`).
1087-
- :func:`Series.rolling().apply() <pandas.core.window.Rolling.apply>`, :func:`DataFrame.rolling().apply() <pandas.core.window.Rolling.apply>`,
1088-
:func:`Series.expanding().apply() <pandas.core.window.Expanding.apply>`, and :func:`DataFrame.expanding().apply() <pandas.core.window.Expanding.apply>` have deprecated passing an ``np.array`` by default. One will need to pass the new ``raw`` parameter to be explicit about what is passed (:issue:`20584`)
1087+
- :func:`Series.rolling().apply() <.Rolling.apply>`, :func:`DataFrame.rolling().apply() <.Rolling.apply>`, :func:`Series.expanding().apply() <.Expanding.apply>`, and :func:`DataFrame.expanding().apply() <.Expanding.apply>` have deprecated passing an ``np.array`` by default. One will need to pass the new ``raw`` parameter to be explicit about what is passed (:issue:`20584`)
10891088
- The ``data``, ``base``, ``strides``, ``flags`` and ``itemsize`` properties
10901089
of the ``Series`` and ``Index`` classes have been deprecated and will be
10911090
removed in a future version (:issue:`20419`).
@@ -1159,15 +1158,15 @@ Performance improvements
11591158
- Improved performance of :func:`MultiIndex.remove_unused_levels` when there are no unused levels, at the cost of a reduction in performance when there are (:issue:`19289`)
11601159
- Improved performance of :func:`Index.get_loc` for non-unique indexes (:issue:`19478`)
11611160
- Improved performance of pairwise ``.rolling()`` and ``.expanding()`` with ``.cov()`` and ``.corr()`` operations (:issue:`17917`)
1162-
- Improved performance of :func:`pandas.core.groupby.GroupBy.rank` (:issue:`15779`)
1161+
- Improved performance of :func:`.GroupBy.rank` (:issue:`15779`)
11631162
- Improved performance of variable ``.rolling()`` on ``.min()`` and ``.max()`` (:issue:`19521`)
1164-
- Improved performance of :func:`pandas.core.groupby.GroupBy.ffill` and :func:`pandas.core.groupby.GroupBy.bfill` (:issue:`11296`)
1165-
- Improved performance of :func:`pandas.core.groupby.GroupBy.any` and :func:`pandas.core.groupby.GroupBy.all` (:issue:`15435`)
1166-
- Improved performance of :func:`pandas.core.groupby.GroupBy.pct_change` (:issue:`19165`)
1163+
- Improved performance of :func:`.GroupBy.ffill` and :func:`.GroupBy.bfill` (:issue:`11296`)
1164+
- Improved performance of :func:`.GroupBy.any` and :func:`.GroupBy.all` (:issue:`15435`)
1165+
- Improved performance of :func:`.GroupBy.pct_change` (:issue:`19165`)
11671166
- Improved performance of :func:`Series.isin` in the case of categorical dtypes (:issue:`20003`)
11681167
- Improved performance of ``getattr(Series, attr)`` when the Series has certain index types. This manifested in slow printing of large Series with a ``DatetimeIndex`` (:issue:`19764`)
11691168
- Fixed a performance regression for :func:`GroupBy.nth` and :func:`GroupBy.last` with some object columns (:issue:`19283`)
1170-
- Improved performance of :func:`pandas.core.arrays.Categorical.from_codes` (:issue:`18501`)
1169+
- Improved performance of :func:`.Categorical.from_codes` (:issue:`18501`)
11711170

11721171
.. _whatsnew_0230.docs:
11731172

@@ -1412,13 +1411,13 @@ GroupBy/resample/rolling
14121411
- Bug in :func:`DataFrame.groupby` where aggregation by ``first``/``last``/``min``/``max`` was causing timestamps to lose precision (:issue:`19526`)
14131412
- Bug in :func:`DataFrame.transform` where particular aggregation functions were being incorrectly cast to match the dtype(s) of the grouped data (:issue:`19200`)
14141413
- Bug in :func:`DataFrame.groupby` passing the ``on=`` kwarg, and subsequently using ``.apply()`` (:issue:`17813`)
1415-
- Bug in :func:`DataFrame.resample().aggregate <pandas.core.resample.Resampler.aggregate>` not raising a ``KeyError`` when aggregating a non-existent column (:issue:`16766`, :issue:`19566`)
1414+
- Bug in :func:`DataFrame.resample().aggregate <.Resampler.aggregate>` not raising a ``KeyError`` when aggregating a non-existent column (:issue:`16766`, :issue:`19566`)
14161415
- Bug in :func:`DataFrameGroupBy.cumsum` and :func:`DataFrameGroupBy.cumprod` when ``skipna`` was passed (:issue:`19806`)
14171416
- Bug in :func:`DataFrame.resample` that dropped timezone information (:issue:`13238`)
14181417
- Bug in :func:`DataFrame.groupby` where transformations using ``np.all`` and ``np.any`` were raising a ``ValueError`` (:issue:`20653`)
14191418
- Bug in :func:`DataFrame.resample` where ``ffill``, ``bfill``, ``pad``, ``backfill``, ``fillna``, ``interpolate``, and ``asfreq`` were ignoring ``loffset``. (:issue:`20744`)
14201419
- Bug in :func:`DataFrame.groupby` when applying a function that has mixed data types and the user supplied function can fail on the grouping column (:issue:`20949`)
1421-
- Bug in :func:`DataFrameGroupBy.rolling().apply() <pandas.core.window.Rolling.apply>` where operations performed against the associated :class:`DataFrameGroupBy` object could impact the inclusion of the grouped item(s) in the result (:issue:`14013`)
1420+
- Bug in :func:`DataFrameGroupBy.rolling().apply() <.Rolling.apply>` where operations performed against the associated :class:`DataFrameGroupBy` object could impact the inclusion of the grouped item(s) in the result (:issue:`14013`)
14221421

14231422
Sparse
14241423
^^^^^^

doc/source/whatsnew/v0.23.1.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ Bug fixes
100100
**Groupby/resample/rolling**
101101

102102
- Bug in :func:`DataFrame.agg` where applying multiple aggregation functions to a :class:`DataFrame` with duplicated column names would cause a stack overflow (:issue:`21063`)
103-
- Bug in :func:`pandas.core.groupby.GroupBy.ffill` and :func:`pandas.core.groupby.GroupBy.bfill` where the fill within a grouping would not always be applied as intended due to the implementations' use of a non-stable sort (:issue:`21207`)
104-
- Bug in :func:`pandas.core.groupby.GroupBy.rank` where results did not scale to 100% when specifying ``method='dense'`` and ``pct=True``
103+
- Bug in :func:`.GroupBy.ffill` and :func:`.GroupBy.bfill` where the fill within a grouping would not always be applied as intended due to the implementations' use of a non-stable sort (:issue:`21207`)
104+
- Bug in :func:`.GroupBy.rank` where results did not scale to 100% when specifying ``method='dense'`` and ``pct=True``
105105
- Bug in :func:`pandas.DataFrame.rolling` and :func:`pandas.Series.rolling` which incorrectly accepted a 0 window size rather than raising (:issue:`21286`)
106106

107107
**Data-type specific**

0 commit comments

Comments
 (0)