Skip to content

Commit 25985f7

Browse files
Merge remote-tracking branch 'upstream/master' into bisect
2 parents de7fe0c + 8e10daa commit 25985f7

File tree

102 files changed

+1911
-1371
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+1911
-1371
lines changed

.pre-commit-config.yaml

+27
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,30 @@ repos:
3030
hooks:
3131
- id: pyupgrade
3232
args: [--py37-plus]
33+
- repo: https://github.com/pre-commit/pygrep-hooks
34+
rev: v1.6.0
35+
hooks:
36+
- id: rst-backticks
37+
# these exclusions should be removed and the files fixed
38+
exclude: (?x)(
39+
categorical\.rst|
40+
contributing\.rst|
41+
contributing_docstring\.rst|
42+
extending\.rst|
43+
ecosystem\.rst|
44+
comparison_with_sql\.rst|
45+
install\.rst|
46+
calculate_statistics\.rst|
47+
combine_dataframes\.rst|
48+
v0\.|
49+
v1\.0\.|
50+
v1\.1\.[012])
51+
- repo: local
52+
hooks:
53+
- id: pip_to_conda
54+
name: Generate pip dependency from conda
55+
description: This hook checks if the conda environment.yml and requirements-dev.txt are equal
56+
language: system
57+
entry: python -m scripts.generate_pip_deps_from_conda
58+
files: ^(environment.yml|requirements-dev.txt)$
59+
pass_filenames: false

.travis.yml

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
language: python
22
python: 3.7
33

4+
addons:
5+
apt:
6+
update: true
7+
packages:
8+
- xvfb
9+
10+
services:
11+
- xvfb
12+
413
# To turn off cached cython files and compiler cache
514
# set NOCACHE-true
615
# To delete caches go to https://travis-ci.org/OWNER/REPOSITORY/caches or run
@@ -10,30 +19,27 @@ cache:
1019
ccache: true
1120
directories:
1221
- $HOME/.cache # cython cache
13-
- $HOME/.ccache # compiler cache
1422

1523
env:
1624
global:
17-
# Variable for test workers
1825
- PYTEST_WORKERS="auto"
1926
# create a github personal access token
2027
# cd pandas-dev/pandas
2128
# travis encrypt 'PANDAS_GH_TOKEN=personal_access_token' -r pandas-dev/pandas
2229
- secure: "EkWLZhbrp/mXJOx38CHjs7BnjXafsqHtwxPQrqWy457VDFWhIY1DMnIR/lOWG+a20Qv52sCsFtiZEmMfUjf0pLGXOqurdxbYBGJ7/ikFLk9yV2rDwiArUlVM9bWFnFxHvdz9zewBH55WurrY4ShZWyV+x2dWjjceWG5VpWeI6sA="
2330

2431
git:
25-
# for cloning
2632
depth: false
2733

2834
matrix:
2935
fast_finish: true
3036

3137
include:
32-
# In allowed failures
3338
- dist: bionic
3439
python: 3.9-dev
3540
env:
3641
- JOB="3.9-dev" PATTERN="(not slow and not network and not clipboard)"
42+
3743
- env:
3844
- JOB="3.8" ENV_FILE="ci/deps/travis-38.yaml" PATTERN="(not slow and not network and not clipboard)"
3945

@@ -42,7 +48,7 @@ matrix:
4248

4349
- arch: arm64
4450
env:
45-
- JOB="3.7, arm64" PYTEST_WORKERS=8 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)"
51+
- JOB="3.7, arm64" PYTEST_WORKERS=1 ENV_FILE="ci/deps/travis-37-arm64.yaml" PATTERN="(not slow and not network and not clipboard and not arm_slow)"
4652

4753
- env:
4854
- JOB="3.7, locale" ENV_FILE="ci/deps/travis-37-locale.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8" SQL="1"
@@ -71,12 +77,6 @@ before_install:
7177
- uname -a
7278
- git --version
7379
- ./ci/check_git_tags.sh
74-
# Because travis runs on Google Cloud and has a /etc/boto.cfg,
75-
# it breaks moto import, see:
76-
# https://github.com/spulec/moto/issues/1771
77-
# https://github.com/boto/boto/issues/3741
78-
# This overrides travis and tells it to look nowhere.
79-
- export BOTO_CONFIG=/dev/null
8080

8181
install:
8282
- echo "install start"

ci/build39.sh

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash -e
22
# Special build for python3.9 until numpy puts its own wheels up
33

4-
sudo apt-get install build-essential gcc xvfb
54
pip install --no-deps -U pip wheel setuptools
65
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis
76

ci/setup_env.sh

+1-11
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ else
4242
fi
4343

4444
if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
45-
sudo apt-get update
46-
sudo apt-get -y install xvfb
47-
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.5-0/Miniforge3-4.8.5-0-Linux-aarch64.sh"
45+
CONDA_URL="https://github.com/conda-forge/miniforge/releases/download/4.8.5-1/Miniforge3-4.8.5-1-Linux-aarch64.sh"
4846
else
4947
CONDA_URL="https://repo.continuum.io/miniconda/Miniconda3-latest-$CONDA_OS.sh"
5048
fi
@@ -100,8 +98,6 @@ echo "conda list (root environment)"
10098
conda list
10199

102100
# Clean up any left-over from a previous build
103-
# (note workaround for https://github.com/conda/conda/issues/2679:
104-
# `conda env remove` issue)
105101
conda remove --all -q -y -n pandas-dev
106102

107103
echo
@@ -142,12 +138,6 @@ conda list pandas
142138
echo "[Build extensions]"
143139
python setup.py build_ext -q -i -j2
144140

145-
# TODO: Some of our environments end up with old versions of pip (10.x)
146-
# Adding a new enough version of pip to the requirements explodes the
147-
# solve time. Just using pip to update itself.
148-
# - py35_macos
149-
# - py35_compat
150-
# - py36_32bit
151141
echo "[Updating pip]"
152142
python -m pip install --no-deps -U pip wheel setuptools
153143

doc/source/development/policies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ deprecations, API compatibility, and version numbering.
1616

1717
A pandas release number is made up of ``MAJOR.MINOR.PATCH``.
1818

19-
API breaking changes should only occur in **major** releases. Theses changes
19+
API breaking changes should only occur in **major** releases. These changes
2020
will be documented, with clear guidance on what is changing, why it's changing,
2121
and how to migrate existing code to the new behavior.
2222

doc/source/getting_started/overview.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Here are just a few of the things that pandas does well:
4040
higher dimensional objects
4141
- Automatic and explicit **data alignment**: objects can be explicitly
4242
aligned to a set of labels, or the user can simply ignore the labels and
43-
let `Series`, `DataFrame`, etc. automatically align the data for you in
43+
let ``Series``, ``DataFrame``, etc. automatically align the data for you in
4444
computations
4545
- Powerful, flexible **group by** functionality to perform
4646
split-apply-combine operations on data sets, for both aggregating and

doc/source/reference/panel.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ Panel
77
=====
88
.. currentmodule:: pandas
99

10-
`Panel` was removed in 0.25.0. For prior documentation, see the `0.24 documentation <https://pandas.pydata.org/pandas-docs/version/0.24/reference/panel.html>`_
10+
``Panel`` was removed in 0.25.0. For prior documentation, see the `0.24 documentation <https://pandas.pydata.org/pandas-docs/version/0.24/reference/panel.html>`_

doc/source/reference/plotting.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Plotting
77
========
88
.. currentmodule:: pandas.plotting
99

10-
The following functions are contained in the `pandas.plotting` module.
10+
The following functions are contained in the ``pandas.plotting`` module.
1111

1212
.. autosummary::
1313
:toctree: api/

doc/source/user_guide/10min.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -431,9 +431,9 @@ See more at :ref:`Histogramming and Discretization <basics.discretization>`.
431431
String Methods
432432
~~~~~~~~~~~~~~
433433

434-
Series is equipped with a set of string processing methods in the `str`
434+
Series is equipped with a set of string processing methods in the ``str``
435435
attribute that make it easy to operate on each element of the array, as in the
436-
code snippet below. Note that pattern-matching in `str` generally uses `regular
436+
code snippet below. Note that pattern-matching in ``str`` generally uses `regular
437437
expressions <https://docs.python.org/3/library/re.html>`__ by default (and in
438438
some cases always uses them). See more at :ref:`Vectorized String Methods
439439
<text.string_methods>`.

doc/source/user_guide/basics.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -1459,7 +1459,7 @@ for altering the ``Series.name`` attribute.
14591459
.. versionadded:: 0.24.0
14601460

14611461
The methods :meth:`DataFrame.rename_axis` and :meth:`Series.rename_axis`
1462-
allow specific names of a `MultiIndex` to be changed (as opposed to the
1462+
allow specific names of a ``MultiIndex`` to be changed (as opposed to the
14631463
labels).
14641464

14651465
.. ipython:: python
@@ -1592,7 +1592,7 @@ index value along with a Series containing the data in each row:
15921592
row
15931593
15941594
All values in ``row``, returned as a Series, are now upcasted
1595-
to floats, also the original integer value in column `x`:
1595+
to floats, also the original integer value in column ``x``:
15961596

15971597
.. ipython:: python
15981598
@@ -1787,8 +1787,8 @@ used to sort a pandas object by its index levels.
17871787
.. versionadded:: 1.1.0
17881788

17891789
Sorting by index also supports a ``key`` parameter that takes a callable
1790-
function to apply to the index being sorted. For `MultiIndex` objects,
1791-
the key is applied per-level to the levels specified by `level`.
1790+
function to apply to the index being sorted. For ``MultiIndex`` objects,
1791+
the key is applied per-level to the levels specified by ``level``.
17921792

17931793
.. ipython:: python
17941794
@@ -1812,8 +1812,8 @@ For information on key sorting by value, see :ref:`value sorting
18121812
By values
18131813
~~~~~~~~~
18141814

1815-
The :meth:`Series.sort_values` method is used to sort a `Series` by its values. The
1816-
:meth:`DataFrame.sort_values` method is used to sort a `DataFrame` by its column or row values.
1815+
The :meth:`Series.sort_values` method is used to sort a ``Series`` by its values. The
1816+
:meth:`DataFrame.sort_values` method is used to sort a ``DataFrame`` by its column or row values.
18171817
The optional ``by`` parameter to :meth:`DataFrame.sort_values` may used to specify one or more columns
18181818
to use to determine the sorted order.
18191819

@@ -1855,8 +1855,8 @@ to apply to the values being sorted.
18551855
s1.sort_values()
18561856
s1.sort_values(key=lambda x: x.str.lower())
18571857
1858-
`key` will be given the :class:`Series` of values and should return a ``Series``
1859-
or array of the same shape with the transformed values. For `DataFrame` objects,
1858+
``key`` will be given the :class:`Series` of values and should return a ``Series``
1859+
or array of the same shape with the transformed values. For ``DataFrame`` objects,
18601860
the key is applied per column, so the key should still expect a Series and return
18611861
a Series, e.g.
18621862

doc/source/user_guide/cookbook.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ Often it's useful to obtain the lower (or upper) triangular form of a correlatio
12701270
12711271
corr_mat.where(mask)
12721272
1273-
The `method` argument within `DataFrame.corr` can accept a callable in addition to the named correlation types. Here we compute the `distance correlation <https://en.wikipedia.org/wiki/Distance_correlation>`__ matrix for a `DataFrame` object.
1273+
The ``method`` argument within ``DataFrame.corr`` can accept a callable in addition to the named correlation types. Here we compute the ``distance correlation <https://en.wikipedia.org/wiki/Distance_correlation>``__ matrix for a ``DataFrame`` object.
12741274

12751275
.. ipython:: python
12761276

doc/source/user_guide/enhancingperf.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -488,9 +488,9 @@ These operations are supported by :func:`pandas.eval`:
488488
* Attribute access, e.g., ``df.a``
489489
* Subscript expressions, e.g., ``df[0]``
490490
* Simple variable evaluation, e.g., ``pd.eval('df')`` (this is not very useful)
491-
* Math functions: `sin`, `cos`, `exp`, `log`, `expm1`, `log1p`,
492-
`sqrt`, `sinh`, `cosh`, `tanh`, `arcsin`, `arccos`, `arctan`, `arccosh`,
493-
`arcsinh`, `arctanh`, `abs`, `arctan2` and `log10`.
491+
* Math functions: ``sin``, ``cos``, ``exp``, ``log``, ``expm1``, ``log1p``,
492+
``sqrt``, ``sinh``, ``cosh``, ``tanh``, ``arcsin``, ``arccos``, ``arctan``, ``arccosh``,
493+
``arcsinh``, ``arctanh``, ``abs``, ``arctan2`` and ``log10``.
494494

495495
This Python syntax is **not** allowed:
496496

doc/source/user_guide/groupby.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -216,10 +216,10 @@ in case you want to include ``NA`` values in group keys, you could pass ``dropna
216216
217217
.. ipython:: python
218218
219-
# Default `dropna` is set to True, which will exclude NaNs in keys
219+
# Default ``dropna`` is set to True, which will exclude NaNs in keys
220220
df_dropna.groupby(by=["b"], dropna=True).sum()
221221
222-
# In order to allow NaN in keys, set `dropna` to False
222+
# In order to allow NaN in keys, set ``dropna`` to False
223223
df_dropna.groupby(by=["b"], dropna=False).sum()
224224
225225
The default setting of ``dropna`` argument is ``True`` which means ``NA`` are not included in group keys.

0 commit comments

Comments
 (0)