Skip to content

Commit b875b43

Browse files
committed
Merge branch 'master' into nui-regression
2 parents 1f98682 + 9f1a41d commit b875b43

Some content is hidden

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

53 files changed

+4114
-3577
lines changed

.github/workflows/database.yml

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
name: Database
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches:
8+
- master
9+
- 1.2.x
10+
11+
env:
12+
PYTEST_WORKERS: "auto"
13+
PANDAS_CI: 1
14+
PATTERN: ((not slow and not network and not clipboard) or (single and db))
15+
16+
jobs:
17+
Linux_py37_locale:
18+
runs-on: ubuntu-latest
19+
defaults:
20+
run:
21+
shell: bash -l {0}
22+
23+
env:
24+
ENV_FILE: ci/deps/actions-37-locale.yaml
25+
LOCALE_OVERRIDE: zh_CN.UTF-8
26+
27+
services:
28+
mysql:
29+
image: mysql
30+
env:
31+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
32+
MYSQL_DATABASE: pandas
33+
options: >-
34+
--health-cmd "mysqladmin ping"
35+
--health-interval 10s
36+
--health-timeout 5s
37+
--health-retries 5
38+
ports:
39+
- 3306:3306
40+
41+
postgres:
42+
image: postgres
43+
env:
44+
POSTGRES_USER: postgres
45+
POSTGRES_PASSWORD: postgres
46+
POSTGRES_DB: pandas
47+
options: >-
48+
--health-cmd pg_isready
49+
--health-interval 10s
50+
--health-timeout 5s
51+
--health-retries 5
52+
ports:
53+
- 5432:5432
54+
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v1
58+
59+
- name: Cache conda
60+
uses: actions/cache@v1
61+
env:
62+
CACHE_NUMBER: 0
63+
with:
64+
path: ~/conda_pkgs_dir
65+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
66+
hashFiles('${{ env.ENV_FILE }}') }}
67+
68+
- uses: conda-incubator/setup-miniconda@v2
69+
with:
70+
activate-environment: pandas-dev
71+
channel-priority: strict
72+
environment-file: ${{ env.ENV_FILE }}
73+
use-only-tar-bz2: true
74+
75+
- name: Environment Detail
76+
run: |
77+
conda info
78+
conda list
79+
80+
- name: Build Pandas
81+
run: |
82+
python setup.py build_ext -j 2
83+
python -m pip install -e . --no-build-isolation --no-use-pep517
84+
85+
- name: Test
86+
run: ci/run_tests.sh
87+
if: always()
88+
89+
- name: Publish test results
90+
uses: actions/upload-artifact@master
91+
with:
92+
name: Test results
93+
path: test-data.xml
94+
if: failure()
95+
96+
- name: Print skipped tests
97+
run: python ci/print_skipped.py
98+
99+
Linux_py37_cov:
100+
runs-on: ubuntu-latest
101+
defaults:
102+
run:
103+
shell: bash -l {0}
104+
105+
env:
106+
ENV_FILE: ci/deps/actions-37-cov.yaml
107+
PANDAS_TESTING_MODE: deprecate
108+
COVERAGE: true
109+
110+
services:
111+
mysql:
112+
image: mysql
113+
env:
114+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
115+
MYSQL_DATABASE: pandas
116+
options: >-
117+
--health-cmd "mysqladmin ping"
118+
--health-interval 10s
119+
--health-timeout 5s
120+
--health-retries 5
121+
ports:
122+
- 3306:3306
123+
124+
postgres:
125+
image: postgres
126+
env:
127+
POSTGRES_USER: postgres
128+
POSTGRES_PASSWORD: postgres
129+
POSTGRES_DB: pandas
130+
options: >-
131+
--health-cmd pg_isready
132+
--health-interval 10s
133+
--health-timeout 5s
134+
--health-retries 5
135+
ports:
136+
- 5432:5432
137+
138+
steps:
139+
- name: Checkout
140+
uses: actions/checkout@v1
141+
142+
- name: Cache conda
143+
uses: actions/cache@v1
144+
env:
145+
CACHE_NUMBER: 0
146+
with:
147+
path: ~/conda_pkgs_dir
148+
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
149+
hashFiles('${{ env.ENV_FILE }}') }}
150+
151+
- uses: conda-incubator/setup-miniconda@v2
152+
with:
153+
activate-environment: pandas-dev
154+
channel-priority: strict
155+
environment-file: ${{ env.ENV_FILE }}
156+
use-only-tar-bz2: true
157+
158+
- name: Environment Detail
159+
run: |
160+
conda info
161+
conda list
162+
163+
- name: Build Pandas
164+
run: |
165+
python setup.py build_ext -j 2
166+
python -m pip install -e . --no-build-isolation --no-use-pep517
167+
168+
- name: Test
169+
run: ci/run_tests.sh
170+
if: always()
171+
172+
- name: Publish test results
173+
uses: actions/upload-artifact@master
174+
with:
175+
name: Test results
176+
path: test-data.xml
177+
if: failure()
178+
179+
- name: Print skipped tests
180+
run: python ci/print_skipped.py

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ repos:
8989
# No direct imports from conftest
9090
conftest\ import|
9191
import\ conftest
92+
93+
# Check for use of pandas.testing instead of tm
94+
pd\.testing\.
9295
types: [python]
9396
files: ^pandas/tests/
9497
- id: incorrect-code-directives

.travis.yml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ services:
1616
# travis cache --delete inside the project directory from the travis command line client
1717
# The cache directories will be deleted if anything in ci/ changes in a commit
1818
cache:
19+
apt: true
1920
ccache: true
2021
directories:
2122
- $HOME/.cache # cython cache
2223

2324
env:
2425
global:
25-
- PYTEST_WORKERS="auto"
2626
# create a github personal access token
2727
# cd pandas-dev/pandas
2828
# travis encrypt 'PANDAS_GH_TOKEN=personal_access_token' -r pandas-dev/pandas
@@ -35,25 +35,10 @@ matrix:
3535
fast_finish: true
3636

3737
include:
38-
- env:
39-
- 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"
40-
services:
41-
- mysql
42-
- postgresql
43-
4438
- arch: arm64
4539
env:
4640
- 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)"
4741

48-
- env:
49-
# Enabling Deprecations when running tests
50-
# PANDAS_TESTING_MODE="deprecate" causes DeprecationWarning messages to be displayed in the logs
51-
# See pandas/_testing.py for more details.
52-
- JOB="3.7, coverage" ENV_FILE="ci/deps/travis-37-cov.yaml" PATTERN="((not slow and not network and not clipboard) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true SQL="1"
53-
services:
54-
- mysql
55-
- postgresql
56-
5742
allow_failures:
5843
# Moved to allowed_failures 2020-09-29 due to timeouts https://github.com/pandas-dev/pandas/issues/36719
5944
- arch: arm64

asv_bench/benchmarks/rolling.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,22 @@ def time_groupby_mean(self, engine):
252252
self.gb_ewm.mean(engine=engine)
253253

254254

255+
def table_method_func(x):
256+
return np.sum(x, axis=0) + 1
257+
258+
259+
class TableMethod:
260+
261+
params = ["single", "table"]
262+
param_names = ["method"]
263+
264+
def setup(self, method):
265+
self.df = pd.DataFrame(np.random.randn(10, 1000))
266+
267+
def time_apply(self, method):
268+
self.df.rolling(2, method=method).apply(
269+
table_method_func, raw=True, engine="numba"
270+
)
271+
272+
255273
from .pandas_vb_common import setup # noqa: F401 isort:skip

ci/deps/travis-37-cov.yaml renamed to ci/deps/actions-37-cov.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
- beautifulsoup4
1616
- botocore>=1.11
1717
- dask
18-
- fastparquet>=0.3.2
18+
- fastparquet>=0.4.0
1919
- fsspec>=0.7.4
2020
- gcsfs>=0.6.0
2121
- geopandas

ci/deps/travis-37-locale.yaml renamed to ci/deps/actions-37-locale.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: pandas-dev
22
channels:
3-
- defaults
43
- conda-forge
54
dependencies:
65
- python=3.7.*
@@ -18,9 +17,9 @@ dependencies:
1817

1918
# optional
2019
- beautifulsoup4
21-
- blosc=1.15.0
20+
- blosc=1.17.0
2221
- python-blosc
23-
- fastparquet=0.3.2
22+
- fastparquet=0.4.0
2423
- html5lib
2524
- ipython
2625
- jinja2
@@ -43,5 +42,5 @@ dependencies:
4342

4443
# sql
4544
- psycopg2=2.7
46-
- pymysql=0.7.11
45+
- pymysql=0.8.1
4746
- sqlalchemy=1.3.0

ci/deps/azure-38-locale.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ dependencies:
1818
- html5lib
1919
- ipython
2020
- jinja2
21+
- jedi<0.18.0
2122
- lxml
2223
- matplotlib <3.3.0
2324
- moto

ci/deps/azure-38-slow.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: pandas-dev
22
channels:
3-
- defaults
43
- conda-forge
54
dependencies:
65
- python=3.8.*

ci/deps/azure-windows-38.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ dependencies:
1515
# pandas dependencies
1616
- blosc
1717
- bottleneck
18-
- fastparquet>=0.3.2
18+
- fastparquet>=0.4.0
1919
- flask
2020
- fsspec>=0.8.0
2121
- matplotlib=3.1.3

doc/source/ecosystem.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ Compose is a machine learning tool for labeling data and prediction engineering.
9090
Visualization
9191
-------------
9292

93+
While :ref:`pandas has built-in support for data visualization with matplotlib <visualization>`,
94+
there are a number of other pandas-compatible libraries.
95+
9396
`Altair <https://altair-viz.github.io/>`__
9497
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9598

doc/source/getting_started/install.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,12 @@ Jinja2 2.10 Conditional formatting with DataFra
263263
PyQt4 Clipboard I/O
264264
PyQt5 Clipboard I/O
265265
PyTables 3.5.1 HDF5-based reading / writing
266-
SQLAlchemy 1.2.8 SQL support for databases other than sqlite
266+
SQLAlchemy 1.3.0 SQL support for databases other than sqlite
267267
SciPy 1.12.0 Miscellaneous statistical functions
268268
xlsxwriter 1.0.2 Excel writing
269-
blosc 1.15.0 Compression for HDF5
269+
blosc 1.17.0 Compression for HDF5
270270
fsspec 0.7.4 Handling files aside from local and HTTP
271-
fastparquet 0.3.2 Parquet reading / writing
271+
fastparquet 0.4.0 Parquet reading / writing
272272
gcsfs 0.6.0 Google Cloud Storage access
273273
html5lib 1.0.1 HTML parser for read_html (see :ref:`note <optional_html>`)
274274
lxml 4.3.0 HTML parser for read_html (see :ref:`note <optional_html>`)
@@ -278,7 +278,7 @@ openpyxl 2.6.0 Reading / writing for xlsx files
278278
pandas-gbq 0.12.0 Google Big Query access
279279
psycopg2 2.7 PostgreSQL engine for sqlalchemy
280280
pyarrow 0.15.0 Parquet, ORC, and feather reading / writing
281-
pymysql 0.7.11 MySQL engine for sqlalchemy
281+
pymysql 0.8.1 MySQL engine for sqlalchemy
282282
pyreadstat SPSS files (.sav) reading
283283
pyxlsb 1.0.6 Reading for xlsb files
284284
qtpy Clipboard I/O

doc/source/getting_started/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ pandas possible. Thanks to `all of our contributors <https://github.com/pandas-d
147147

148148
If you're interested in contributing, please visit the :ref:`contributing guide <contributing>`.
149149

150-
pandas is a `NumFOCUS <https://www.numfocus.org/open-source-projects/>`__ sponsored project.
150+
pandas is a `NumFOCUS <https://numfocus.org/sponsored-projects>`__ sponsored project.
151151
This will help ensure the success of the development of pandas as a world-class open-source
152152
project and makes it possible to `donate <https://pandas.pydata.org/donate.html>`__ to the project.
153153

0 commit comments

Comments
 (0)