Skip to content

DOC: Remove absolute urls from the docs #32539

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

Merged
merged 24 commits into from
Mar 12, 2020
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Filtering in SQL is done via a WHERE clause.
LIMIT 5;

DataFrames can be filtered in multiple ways; the most intuitive of which is using
`boolean indexing <https://pandas.pydata.org/pandas-docs/stable/indexing.html#boolean-indexing>`_.
:ref:`boolean indexing <boolean.indexing>`.

.. ipython:: python

Expand Down
3 changes: 1 addition & 2 deletions doc/source/user_guide/cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,7 @@ The :ref:`Resample <timeseries.resampling>` docs.
`Time grouping with some missing values
<https://stackoverflow.com/questions/33637312/pandas-grouper-by-frequency-with-completeness-requirement>`__

`Valid frequency arguments to Grouper
<https://pandas.pydata.org/pandas-docs/stable/timeseries.html#offset-aliases>`__
Valid frequency arguments to Grouper :ref:`Timeseries <timeseries.offset_aliases>`

`Grouping using a MultiIndex
<https://stackoverflow.com/questions/41483763/pandas-timegrouper-on-multiindex>`__
Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ new column. In 0.21.0 and later, this will raise a ``UserWarning``:

In [1]: df = pd.DataFrame({'one': [1., 2., 3.]})
In [2]: df.two = [4, 5, 6]
UserWarning: Pandas doesn't allow Series to be assigned into nonexistent columns - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute_access
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you revert this one as well? (it's in the output of code, which should still return the absolute url)

UserWarning: Pandas doesn't allow Series to be assigned into nonexistent columns - see :ref:`attribute accessing for Series <attribute.access>`
In [3]: df
Out[3]:
one
Expand Down Expand Up @@ -676,7 +676,7 @@ Current behavior
KeyError in the future, you can use .reindex() as an alternative.

See the documentation here:
https://pandas.pydata.org/pandas-docs/stable/indexing.html#deprecate-loc-reindex-listlike
:ref:`deprecate loc reindex for list-likes <deprecate.loc.reindex.listlike>`

Out[4]:
1 2.0
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7510,8 +7510,8 @@ def asfreq(

Notes
-----
To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see this link:
:ref:`Timeseries <timeseries.offset_aliases>`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should be kept as is (or with updated url if needed), as the docstrings are otherwise not useful as plain text

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and the same for the other changes below in .py files)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, Reverting these changes


Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/groupby/grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ class Grouper:
freq : str / frequency object, defaults to None
This will groupby the specified frequency if the target selection
(via key or level) is a datetime-like object. For full specification
of available frequencies, please see `here
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`_.
of available frequencies, please see here:
:ref:`Timeseries <timeseries.offset_aliases>`
axis : str, int, defaults to 0
Number/name of the axis.
sort : bool, default to False
Expand Down
12 changes: 6 additions & 6 deletions pandas/core/indexes/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ class DatetimeIndex(DatetimeTimedeltaMixin):

Notes
-----
To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see
:ref:`Timeseries <timeseries.offset_aliases>`
"""

_typ = "datetimeindex"
Expand Down Expand Up @@ -856,8 +856,8 @@ def date_range(
``DatetimeIndex`` will have ``periods`` linearly spaced elements between
``start`` and ``end`` (closed on both sides).

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see
:ref:`Timeseries <timeseries.offset_aliases>`

Examples
--------
Expand Down Expand Up @@ -1026,8 +1026,8 @@ def bdate_range(
for ``bdate_range``. Use ``date_range`` if specifying ``freq`` is not
desired.

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see
:ref:`Timeseries <timeseries.offset_aliases>`

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1196,8 +1196,8 @@ def interval_range(
``IntervalIndex`` will have ``periods`` linearly spaced elements between
``start`` and ``end``, inclusively.

To learn more about datetime-like frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about datetime-like frequency strings, please see this link
:ref:`Timeseries <timeseries.offset_aliases>`

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/indexes/period.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,8 +758,8 @@ def period_range(
Of the three parameters: ``start``, ``end``, and ``periods``, exactly two
must be specified.

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see this link
:ref:`Timeseries <timeseries.offset_aliases>`

Examples
--------
Expand Down
8 changes: 4 additions & 4 deletions pandas/core/indexes/timedeltas.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ class TimedeltaIndex(DatetimeTimedeltaMixin, dtl.TimelikeOps):

Notes
-----
To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see this link
:ref:`Timeseries <timeseries.offset_aliases>`
"""

_typ = "timedeltaindex"
Expand Down Expand Up @@ -316,8 +316,8 @@ def timedelta_range(
``TimedeltaIndex`` will have ``periods`` linearly spaced elements between
``start`` and ``end`` (closed on both sides).

To learn more about the frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the frequency strings, please see this link
:ref:`Timeseries <timeseries.offset_aliases>`

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/window/rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@ class Window(_Window):
By default, the result is set to the right edge of the window. This can be
changed to the center of the window by setting ``center=True``.

To learn more about the offsets & frequency strings, please see `this link
<https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#offset-aliases>`__.
To learn more about the offsets & frequency strings, please see this link
:ref:`Timeseries <timeseries.offset_aliases>`

The recognized win_types are:

Expand Down