Skip to content

Commit e0dd3b3

Browse files
Updating documentation
1 parent 83a41e6 commit e0dd3b3

File tree

5 files changed

+9
-75
lines changed

5 files changed

+9
-75
lines changed

doc/source/development/contributing.rst

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Creating a Python environment (pip)
236236
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
237237

238238
If you aren't using conda for your development environment, follow these instructions.
239-
You'll need to have at least python3.5 installed on your system.
239+
You'll need to have at least Python 3.6 installed on your system.
240240

241241
.. code-block:: none
242242
@@ -818,29 +818,6 @@ The limitation here is that while a human can reasonably understand that ``is_nu
818818
819819
With custom types and inference this is not always possible so exceptions are made, but every effort should be exhausted to avoid ``cast`` before going down such paths.
820820

821-
Syntax Requirements
822-
~~~~~~~~~~~~~~~~~~~
823-
824-
Because *pandas* still supports Python 3.5, :pep:`526` does not apply and variables **must** be annotated with type comments. Specifically, this is a valid annotation within pandas:
825-
826-
.. code-block:: python
827-
828-
primes = [] # type: List[int]
829-
830-
Whereas this is **NOT** allowed:
831-
832-
.. code-block:: python
833-
834-
primes: List[int] = [] # not supported in Python 3.5!
835-
836-
Note that function signatures can always be annotated per :pep:`3107`:
837-
838-
.. code-block:: python
839-
840-
def sum_of_primes(primes: List[int] = []) -> int:
841-
...
842-
843-
844821
Pandas-specific Types
845822
~~~~~~~~~~~~~~~~~~~~~
846823

@@ -1267,7 +1244,7 @@ environment by::
12671244

12681245
or, to use a specific Python interpreter,::
12691246

1270-
asv run -e -E existing:python3.5
1247+
asv run -e -E existing:python3.6
12711248

12721249
This will display stderr from the benchmarks, and use your local
12731250
``python`` that comes from your ``$PATH``.

doc/source/development/policies.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Pandas may change the behavior of experimental features at any time.
5151
Python Support
5252
~~~~~~~~~~~~~~
5353

54-
Pandas will only drop support for specific Python versions (e.g. 3.5.x, 3.6.x) in
54+
Pandas will only drop support for specific Python versions (e.g. 3.6.x, 3.7.x) in
5555
pandas **major** releases.
5656

5757
.. _SemVer: https://semver.org

doc/source/getting_started/dsintro.rst

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -564,53 +564,6 @@ to a column created earlier in the same :meth:`~DataFrame.assign`.
564564
In the second expression, ``x['C']`` will refer to the newly created column,
565565
that's equal to ``dfa['A'] + dfa['B']``.
566566

567-
To write code compatible with all versions of Python, split the assignment in two.
568-
569-
.. ipython:: python
570-
571-
dependent = pd.DataFrame({"A": [1, 1, 1]})
572-
(dependent.assign(A=lambda x: x['A'] + 1)
573-
.assign(B=lambda x: x['A'] + 2))
574-
575-
.. warning::
576-
577-
Dependent assignment may subtly change the behavior of your code between
578-
Python 3.6 and older versions of Python.
579-
580-
If you wish to write code that supports versions of python before and after 3.6,
581-
you'll need to take care when passing ``assign`` expressions that
582-
583-
* Update an existing column
584-
* Refer to the newly updated column in the same ``assign``
585-
586-
For example, we'll update column "A" and then refer to it when creating "B".
587-
588-
.. code-block:: python
589-
590-
>>> dependent = pd.DataFrame({"A": [1, 1, 1]})
591-
>>> dependent.assign(A=lambda x: x["A"] + 1, B=lambda x: x["A"] + 2)
592-
593-
For Python 3.5 and earlier the expression creating ``B`` refers to the
594-
"old" value of ``A``, ``[1, 1, 1]``. The output is then
595-
596-
.. code-block:: console
597-
598-
A B
599-
0 2 3
600-
1 2 3
601-
2 2 3
602-
603-
For Python 3.6 and later, the expression creating ``A`` refers to the
604-
"new" value of ``A``, ``[2, 2, 2]``, which results in
605-
606-
.. code-block:: console
607-
608-
A B
609-
0 2 4
610-
1 2 4
611-
2 2 4
612-
613-
614567

615568
Indexing / selection
616569
~~~~~~~~~~~~~~~~~~~~

doc/source/getting_started/install.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Instructions for installing from source,
1818
Python version support
1919
----------------------
2020

21-
Officially Python 3.5.3 and above, 3.6, 3.7, and 3.8.
21+
Officially Python 3.6 and above, 3.7, and 3.8.
2222

2323
Installing pandas
2424
-----------------
@@ -140,7 +140,7 @@ Installing with ActivePython
140140
Installation instructions for
141141
`ActivePython <https://www.activestate.com/activepython>`__ can be found
142142
`here <https://www.activestate.com/activepython/downloads>`__. Versions
143-
2.7 and 3.5 include pandas.
143+
2.7, 3.5 and 3.6 include pandas.
144144

145145
Installing using your Linux distribution's package manager.
146146
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

doc/source/whatsnew/v1.0.0.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
What's new in 1.0.0 (??)
44
------------------------
55

6+
.. warning::
7+
8+
Starting with the 1.x series of releases, pandas only supports Python 3.6 and higher.
9+
610
New Deprecation Policy
711
~~~~~~~~~~~~~~~~~~~~~~
812

0 commit comments

Comments
 (0)