Skip to content

Commit e1b638e

Browse files
jschendeljreback
authored andcommitted
DOC: Link to Python 3 versions of official Python docs (#18962)
1 parent e567949 commit e1b638e

File tree

13 files changed

+17
-19
lines changed

13 files changed

+17
-19
lines changed

doc/source/basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1728,7 +1728,7 @@ built-in string methods. For example:
17281728
17291729
Powerful pattern-matching methods are provided as well, but note that
17301730
pattern-matching generally uses `regular expressions
1731-
<https://docs.python.org/2/library/re.html>`__ by default (and in some cases
1731+
<https://docs.python.org/3/library/re.html>`__ by default (and in some cases
17321732
always uses them).
17331733

17341734
Please see :ref:`Vectorized String Methods <text.string_methods>` for a complete

doc/source/enhancingperf.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,8 +468,8 @@ This Python syntax is **not** allowed:
468468

469469
* Statements
470470

471-
- Neither `simple <http://docs.python.org/2/reference/simple_stmts.html>`__
472-
nor `compound <http://docs.python.org/2/reference/compound_stmts.html>`__
471+
- Neither `simple <https://docs.python.org/3/reference/simple_stmts.html>`__
472+
nor `compound <https://docs.python.org/3/reference/compound_stmts.html>`__
473473
statements are allowed. This includes things like ``for``, ``while``, and
474474
``if``.
475475

doc/source/indexing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ as an attribute:
232232

233233
- You can use this access only if the index element is a valid python identifier, e.g. ``s.1`` is not allowed.
234234
See `here for an explanation of valid identifiers
235-
<http://docs.python.org/2.7/reference/lexical_analysis.html#identifiers>`__.
235+
<https://docs.python.org/3/reference/lexical_analysis.html#identifiers>`__.
236236

237237
- The attribute will not be available if it conflicts with an existing method name, e.g. ``s.min`` is not allowed.
238238

doc/source/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Optional Dependencies
234234

235235
* `psycopg2 <http://initd.org/psycopg/>`__: for PostgreSQL
236236
* `pymysql <https://github.com/PyMySQL/PyMySQL>`__: for MySQL.
237-
* `SQLite <https://docs.python.org/3.5/library/sqlite3.html>`__: for SQLite, this is included in Python's standard library by default.
237+
* `SQLite <https://docs.python.org/3/library/sqlite3.html>`__: for SQLite, this is included in Python's standard library by default.
238238

239239
* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 1.4.3 or higher.
240240
* For Excel I/O:

doc/source/io.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3065,7 +3065,7 @@ any pickled pandas object (or any other pickled object) from file:
30653065

30663066
Loading pickled data received from untrusted sources can be unsafe.
30673067

3068-
See: https://docs.python.org/3.6/library/pickle.html
3068+
See: https://docs.python.org/3/library/pickle.html
30693069

30703070
.. warning::
30713071

@@ -4545,7 +4545,7 @@ facilitate data retrieval and to reduce dependency on DB-specific API. Database
45454545
is provided by SQLAlchemy if installed. In addition you will need a driver library for
45464546
your database. Examples of such drivers are `psycopg2 <http://initd.org/psycopg/>`__
45474547
for PostgreSQL or `pymysql <https://github.com/PyMySQL/PyMySQL>`__ for MySQL.
4548-
For `SQLite <https://docs.python.org/3.5/library/sqlite3.html>`__ this is
4548+
For `SQLite <https://docs.python.org/3/library/sqlite3.html>`__ this is
45494549
included in Python's standard library by default.
45504550
You can find an overview of supported drivers for each SQL dialect in the
45514551
`SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__.

doc/source/missing_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ String/Regular Expression Replacement
559559
backslashes than strings without this prefix. Backslashes in raw strings
560560
will be interpreted as an escaped backslash, e.g., ``r'\' == '\\'``. You
561561
should `read about them
562-
<http://docs.python.org/2/reference/lexical_analysis.html#string-literals>`__
562+
<https://docs.python.org/3/reference/lexical_analysis.html#string-literals>`__
563563
if this is unclear.
564564

565565
Replace the '.' with ``NaN`` (str -> str)

doc/source/text.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ i.e., from the end of the string to the beginning of the string:
119119
s2.str.rsplit('_', expand=True, n=1)
120120
121121
Methods like ``replace`` and ``findall`` take `regular expressions
122-
<https://docs.python.org/2/library/re.html>`__, too:
122+
<https://docs.python.org/3/library/re.html>`__, too:
123123

124124
.. ipython:: python
125125
@@ -221,7 +221,7 @@ Extract first match in each subject (extract)
221221
confusing from the perspective of a user.
222222

223223
The ``extract`` method accepts a `regular expression
224-
<https://docs.python.org/2/library/re.html>`__ with at least one
224+
<https://docs.python.org/3/library/re.html>`__ with at least one
225225
capture group.
226226

227227
Extracting a regular expression with more than one group returns a

pandas/_libs/tslibs/ccalendar.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ cdef int dayofweek(int y, int m, int d) nogil:
9494
9595
See Also
9696
--------
97-
[1] https://docs.python.org/3.6/library/calendar.html#calendar.weekday
97+
[1] https://docs.python.org/3/library/calendar.html#calendar.weekday
9898
9999
[2] https://en.wikipedia.org/wiki/\
100100
Determination_of_the_day_of_the_week#Sakamoto.27s_methods

pandas/core/computation/eval.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ def eval(expr, parser='pandas', engine=None, truediv=True,
169169
expr : str or unicode
170170
The expression to evaluate. This string cannot contain any Python
171171
`statements
172-
<http://docs.python.org/2/reference/simple_stmts.html#simple-statements>`__,
172+
<https://docs.python.org/3/reference/simple_stmts.html#simple-statements>`__,
173173
only Python `expressions
174-
<http://docs.python.org/2/reference/simple_stmts.html#expression-statements>`__.
174+
<https://docs.python.org/3/reference/simple_stmts.html#expression-statements>`__.
175175
parser : string, default 'pandas', {'pandas', 'python'}
176176
The parser to use to construct the syntax tree from the expression. The
177177
default of ``'pandas'`` parses code slightly different than standard

pandas/core/indexes/datetimelike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def strftime(self, date_format):
6565
Returns
6666
-------
6767
ndarray of formatted strings
68-
""".format("https://docs.python.org/2/library/datetime.html"
68+
""".format("https://docs.python.org/3/library/datetime.html"
6969
"#strftime-and-strptime-behavior")
7070

7171

pandas/io/pickle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def read_pickle(path, compression='infer'):
5454
file path
5555
5656
Warning: Loading pickled data received from untrusted sources can be
57-
unsafe. See: http://docs.python.org/2.7/library/pickle.html
57+
unsafe. See: https://docs.python.org/3/library/pickle.html
5858
5959
Parameters
6060
----------

pandas/tests/io/formats/test_format.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@ def test_repr_is_valid_construction_code(self):
254254
tm.assert_series_equal(Series(res), Series(idx))
255255

256256
def test_repr_should_return_str(self):
257-
# http://docs.python.org/py3k/reference/datamodel.html#object.__repr__
258-
# http://docs.python.org/reference/datamodel.html#object.__repr__
257+
# https://docs.python.org/3/reference/datamodel.html#object.__repr__
259258
# "...The return value must be a string object."
260259

261260
# (str on py2.x, str (unicode) on py3)

pandas/tests/series/test_repr.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ def test_repr_name_iterable_indexable(self):
140140
repr(s)
141141

142142
def test_repr_should_return_str(self):
143-
# http://docs.python.org/py3k/reference/datamodel.html#object.__repr__
144-
# http://docs.python.org/reference/datamodel.html#object.__repr__
143+
# https://docs.python.org/3/reference/datamodel.html#object.__repr__
145144
# ...The return value must be a string object.
146145

147146
# (str on py2.x, str (unicode) on py3)

0 commit comments

Comments
 (0)