Skip to content

DOC: Link to Python 3 versions of official Python docs #18962

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 1 commit into from
Dec 28, 2017
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion doc/source/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1728,7 +1728,7 @@ built-in string methods. For example:

Powerful pattern-matching methods are provided as well, but note that
pattern-matching generally uses `regular expressions
<https://docs.python.org/2/library/re.html>`__ by default (and in some cases
<https://docs.python.org/3/library/re.html>`__ by default (and in some cases
always uses them).

Please see :ref:`Vectorized String Methods <text.string_methods>` for a complete
Expand Down
4 changes: 2 additions & 2 deletions doc/source/enhancingperf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,8 @@ This Python syntax is **not** allowed:

* Statements

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

Expand Down
2 changes: 1 addition & 1 deletion doc/source/indexing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ as an attribute:

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

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

Expand Down
2 changes: 1 addition & 1 deletion doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Optional Dependencies

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

* `matplotlib <http://matplotlib.org/>`__: for plotting, Version 1.4.3 or higher.
* For Excel I/O:
Expand Down
4 changes: 2 additions & 2 deletions doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3065,7 +3065,7 @@ any pickled pandas object (or any other pickled object) from file:

Loading pickled data received from untrusted sources can be unsafe.

See: https://docs.python.org/3.6/library/pickle.html
See: https://docs.python.org/3/library/pickle.html

.. warning::

Expand Down Expand Up @@ -4545,7 +4545,7 @@ facilitate data retrieval and to reduce dependency on DB-specific API. Database
is provided by SQLAlchemy if installed. In addition you will need a driver library for
your database. Examples of such drivers are `psycopg2 <http://initd.org/psycopg/>`__
for PostgreSQL or `pymysql <https://github.com/PyMySQL/PyMySQL>`__ for MySQL.
For `SQLite <https://docs.python.org/3.5/library/sqlite3.html>`__ this is
For `SQLite <https://docs.python.org/3/library/sqlite3.html>`__ this is
included in Python's standard library by default.
You can find an overview of supported drivers for each SQL dialect in the
`SQLAlchemy docs <http://docs.sqlalchemy.org/en/latest/dialects/index.html>`__.
Expand Down
2 changes: 1 addition & 1 deletion doc/source/missing_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ String/Regular Expression Replacement
backslashes than strings without this prefix. Backslashes in raw strings
will be interpreted as an escaped backslash, e.g., ``r'\' == '\\'``. You
should `read about them
<http://docs.python.org/2/reference/lexical_analysis.html#string-literals>`__
<https://docs.python.org/3/reference/lexical_analysis.html#string-literals>`__
if this is unclear.

Replace the '.' with ``NaN`` (str -> str)
Expand Down
4 changes: 2 additions & 2 deletions doc/source/text.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ i.e., from the end of the string to the beginning of the string:
s2.str.rsplit('_', expand=True, n=1)

Methods like ``replace`` and ``findall`` take `regular expressions
<https://docs.python.org/2/library/re.html>`__, too:
<https://docs.python.org/3/library/re.html>`__, too:

.. ipython:: python

Expand Down Expand Up @@ -221,7 +221,7 @@ Extract first match in each subject (extract)
confusing from the perspective of a user.

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

Extracting a regular expression with more than one group returns a
Expand Down
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/ccalendar.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ cdef int dayofweek(int y, int m, int d) nogil:

See Also
--------
[1] https://docs.python.org/3.6/library/calendar.html#calendar.weekday
[1] https://docs.python.org/3/library/calendar.html#calendar.weekday

[2] https://en.wikipedia.org/wiki/\
Determination_of_the_day_of_the_week#Sakamoto.27s_methods
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/computation/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,9 @@ def eval(expr, parser='pandas', engine=None, truediv=True,
expr : str or unicode
The expression to evaluate. This string cannot contain any Python
`statements
<http://docs.python.org/2/reference/simple_stmts.html#simple-statements>`__,
<https://docs.python.org/3/reference/simple_stmts.html#simple-statements>`__,
only Python `expressions
<http://docs.python.org/2/reference/simple_stmts.html#expression-statements>`__.
<https://docs.python.org/3/reference/simple_stmts.html#expression-statements>`__.
parser : string, default 'pandas', {'pandas', 'python'}
The parser to use to construct the syntax tree from the expression. The
default of ``'pandas'`` parses code slightly different than standard
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def strftime(self, date_format):
Returns
-------
ndarray of formatted strings
""".format("https://docs.python.org/2/library/datetime.html"
""".format("https://docs.python.org/3/library/datetime.html"
"#strftime-and-strptime-behavior")


Expand Down
2 changes: 1 addition & 1 deletion pandas/io/pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def read_pickle(path, compression='infer'):
file path

Warning: Loading pickled data received from untrusted sources can be
unsafe. See: http://docs.python.org/2.7/library/pickle.html
unsafe. See: https://docs.python.org/3/library/pickle.html

Parameters
----------
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/io/formats/test_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ def test_repr_is_valid_construction_code(self):
tm.assert_series_equal(Series(res), Series(idx))

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

# (str on py2.x, str (unicode) on py3)
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/series/test_repr.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ def test_repr_name_iterable_indexable(self):
repr(s)

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

# (str on py2.x, str (unicode) on py3)
Expand Down