Skip to content

Commit 2948d13

Browse files
committed
Merge branch 'master' into PR_TOOL_MERGE_PR_20789
2 parents 02dade9 + c4da79b commit 2948d13

File tree

192 files changed

+5452
-3848
lines changed

Some content is hidden

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

192 files changed

+5452
-3848
lines changed

.travis.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,55 +34,54 @@ matrix:
3434
- os: osx
3535
language: generic
3636
env:
37-
- JOB="3.5_OSX" TEST_ARGS="--skip-slow --skip-network"
37+
- JOB="3.5, OSX" ENV_FILE="ci/travis-35-osx.yaml" TEST_ARGS="--skip-slow --skip-network"
3838
- dist: trusty
3939
env:
40-
- JOB="2.7_LOCALE" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
40+
- JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" SLOW=true
4141
addons:
4242
apt:
4343
packages:
4444
- language-pack-zh-hans
4545
- dist: trusty
4646
env:
47-
- JOB="2.7" TEST_ARGS="--skip-slow" LINT=true
47+
- JOB="2.7, lint" ENV_FILE="ci/travis-27.yaml" TEST_ARGS="--skip-slow" LINT=true
4848
addons:
4949
apt:
5050
packages:
5151
- python-gtk2
52-
# In allow_failures
5352
- dist: trusty
5453
env:
55-
- JOB="3.6" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" CONDA_FORGE=true COVERAGE=true
54+
- JOB="3.6, coverage" ENV_FILE="ci/travis-36.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
5655
# In allow_failures
5756
- dist: trusty
5857
env:
59-
- JOB="3.6_SLOW" SLOW=true
58+
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
6059
# In allow_failures
6160
- dist: trusty
6261
env:
63-
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
62+
- JOB="3.6, NumPy dev" ENV_FILE="ci/travis-36-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
6463
addons:
6564
apt:
6665
packages:
6766
- xsel
6867
# In allow_failures
6968
- dist: trusty
7069
env:
71-
- JOB="3.6_DOC" DOC=true
70+
- JOB="3.6, doc" ENV_FILE="ci/travis-36-doc.yaml" DOC=true
7271
allow_failures:
7372
- dist: trusty
7473
env:
75-
- JOB="3.6_SLOW" SLOW=true
74+
- JOB="3.6, slow" ENV_FILE="ci/travis-36-slow.yaml" SLOW=true
7675
- dist: trusty
7776
env:
78-
- JOB="3.6_NUMPY_DEV" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
77+
- JOB="3.6, NumPy dev" ENV_FILE="ci/travis-36-numpydev.yaml" TEST_ARGS="--skip-slow --skip-network" PANDAS_TESTING_MODE="deprecate"
7978
addons:
8079
apt:
8180
packages:
8281
- xsel
8382
- dist: trusty
8483
env:
85-
- JOB="3.6_DOC" DOC=true
84+
- JOB="3.6, doc" ENV_FILE="ci/travis-36-doc.yaml" DOC=true
8685

8786
before_install:
8887
- echo "before_install"

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<tr>
1111
<td>Latest Release</td>
1212
<td>
13-
<a href="https://pypi.python.org/pypi/pandas/">
13+
<a href="https://pypi.org/project/pandas/">
1414
<img src="https://img.shields.io/pypi/v/pandas.svg" alt="latest release" />
1515
</a>
1616
</td>
@@ -25,7 +25,7 @@
2525
<tr>
2626
<td>Package Status</td>
2727
<td>
28-
<a href="https://pypi.python.org/pypi/pandas/">
28+
<a href="https://pypi.org/project/pandas/">
2929
<img src="https://img.shields.io/pypi/status/pandas.svg" alt="status" /></td>
3030
</a>
3131
</tr>
@@ -158,7 +158,7 @@ The source code is currently hosted on GitHub at:
158158
https://github.com/pandas-dev/pandas
159159

160160
Binary installers for the latest released version are available at the [Python
161-
package index](https://pypi.python.org/pypi/pandas) and on conda.
161+
package index](https://pypi.org/project/pandas) and on conda.
162162

163163
```sh
164164
# conda

appveyor.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,12 @@ install:
7373
- cmd: conda info -a
7474

7575
# create our env
76-
- cmd: conda create -n pandas python=%PYTHON_VERSION% cython pytest>=3.1.0 pytest-xdist
76+
- cmd: conda env create -q -n pandas --file=ci\appveyor-%CONDA_PY%.yaml
7777
- cmd: activate pandas
78-
- cmd: pip install moto
79-
- SET REQ=ci\requirements-%PYTHON_VERSION%_WIN.run
80-
- cmd: echo "installing requirements from %REQ%"
81-
- cmd: conda install -n pandas --file=%REQ%
8278
- cmd: conda list -n pandas
83-
- cmd: echo "installing requirements from %REQ% - done"
84-
85-
# add some pip only reqs to the env
86-
- SET REQ=ci\requirements-%PYTHON_VERSION%_WIN.pip
87-
- cmd: echo "installing requirements from %REQ%"
88-
- cmd: pip install -Ur %REQ%
79+
# uninstall pandas if it's present
80+
- cmd: conda remove pandas -y --force & exit 0
81+
- cmd: pip uninstall -y pandas & exit 0
8982

9083
# build em using the local source checkout in the correct windows env
9184
- cmd: '%CMD_IN_ENV% python setup.py build_ext --inplace'

asv_bench/benchmarks/categoricals.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,24 @@ def time_rank_int_cat(self):
148148

149149
def time_rank_int_cat_ordered(self):
150150
self.s_int_cat_ordered.rank()
151+
152+
153+
class Isin(object):
154+
155+
goal_time = 0.2
156+
157+
params = ['object', 'int64']
158+
param_names = ['dtype']
159+
160+
def setup(self, dtype):
161+
np.random.seed(1234)
162+
n = 5 * 10**5
163+
sample_size = 100
164+
arr = [i for i in np.random.randint(0, n // 10, size=n)]
165+
if dtype == 'object':
166+
arr = ['s%04d' % i for i in arr]
167+
self.sample = np.random.choice(arr, sample_size)
168+
self.series = pd.Series(arr).astype('category')
169+
170+
def time_isin_categorical(self, dtype):
171+
self.series.isin(self.sample)

asv_bench/benchmarks/rolling.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def setup(self, constructor, window, dtype, method):
2222
def time_rolling(self, constructor, window, dtype, method):
2323
getattr(self.roll, method)()
2424

25+
2526
class VariableWindowMethods(Methods):
2627
sample_time = 0.2
2728
params = (['DataFrame', 'Series'],
@@ -37,6 +38,7 @@ def setup(self, constructor, window, dtype, method):
3738
index = pd.date_range('2017-01-01', periods=N, freq='5s')
3839
self.roll = getattr(pd, constructor)(arr, index=index).rolling(window)
3940

41+
4042
class Pairwise(object):
4143

4244
sample_time = 0.2
@@ -59,18 +61,19 @@ def time_pairwise(self, window, method, pairwise):
5961

6062

6163
class Quantile(object):
62-
6364
sample_time = 0.2
6465
params = (['DataFrame', 'Series'],
6566
[10, 1000],
6667
['int', 'float'],
67-
[0, 0.5, 1])
68+
[0, 0.5, 1],
69+
['linear', 'nearest', 'lower', 'higher', 'midpoint'])
6870
param_names = ['constructor', 'window', 'dtype', 'percentile']
6971

70-
def setup(self, constructor, window, dtype, percentile):
71-
N = 10**5
72+
def setup(self, constructor, window, dtype, percentile, interpolation):
73+
N = 10 ** 5
7274
arr = np.random.random(N).astype(dtype)
7375
self.roll = getattr(pd, constructor)(arr).rolling(window)
7476

75-
def time_quantile(self, constructor, window, dtype, percentile):
76-
self.roll.quantile(percentile)
77+
def time_quantile(self, constructor, window, dtype, percentile,
78+
interpolation):
79+
self.roll.quantile(percentile, interpolation=interpolation)

asv_bench/benchmarks/series_methods.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,16 @@ def setup(self):
121121

122122
def time_dir_strings(self):
123123
dir(self.s)
124+
125+
126+
class SeriesGetattr(object):
127+
# https://github.com/pandas-dev/pandas/issues/19764
128+
goal_time = 0.2
129+
130+
def setup(self):
131+
self.s = Series(1,
132+
index=date_range("2012-01-01", freq='s',
133+
periods=int(1e6)))
134+
135+
def time_series_datetimeindex_repr(self):
136+
getattr(self.s, 'a', None)

ci/appveyor-27.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- bottleneck
8+
- dateutil
9+
- html5lib
10+
- jinja2=2.8
11+
- lxml
12+
- matplotlib
13+
- numexpr
14+
- numpy=1.10*
15+
- openpyxl
16+
- pytables==3.2.2
17+
- python=2.7.*
18+
- pytz
19+
- s3fs
20+
- scipy
21+
- sqlalchemy
22+
- xlrd
23+
- xlsxwriter
24+
- xlwt
25+
# universal
26+
- cython
27+
- pytest
28+
- pytest-xdist
29+
- moto

ci/appveyor-36.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- blosc
7+
- bottleneck
8+
- fastparquet
9+
- feather-format
10+
- matplotlib
11+
- numexpr
12+
- numpy=1.13*
13+
- openpyxl
14+
- pyarrow
15+
- pytables
16+
- python-dateutil
17+
- python=3.6.*
18+
- pytz
19+
- scipy
20+
- thrift=0.10*
21+
- xlrd
22+
- xlsxwriter
23+
- xlwt
24+
# universal
25+
- cython
26+
- pytest
27+
- pytest-xdist

ci/circle-27-compat.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- bottleneck=1.0.0
7+
- cython=0.24
8+
- jinja2=2.8
9+
- numexpr=2.4.4 # we test that we correctly don't use an unsupported numexpr
10+
- numpy=1.9.2
11+
- openpyxl
12+
- psycopg2
13+
- pytables=3.2.2
14+
- python-dateutil=2.5.0
15+
- python=2.7*
16+
- pytz=2013b
17+
- scipy=0.14.0
18+
- sqlalchemy=0.7.8
19+
- xlrd=0.9.2
20+
- xlsxwriter=0.5.2
21+
- xlwt=0.7.5
22+
# universal
23+
- pytest
24+
- pytest-xdist
25+
- pip:
26+
- html5lib==1.0b2
27+
- beautifulsoup4==4.2.1
28+
- pymysql==0.6.0

ci/circle-35-ascii.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
dependencies:
5+
- cython
6+
- nomkl
7+
- numpy
8+
- python-dateutil
9+
- python=3.5*
10+
- pytz
11+
# universal
12+
- pytest
13+
- pytest-xdist

ci/circle-36-locale.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- cython
8+
- html5lib
9+
- ipython
10+
- jinja2
11+
- lxml
12+
- matplotlib
13+
- nomkl
14+
- numexpr
15+
- numpy
16+
- openpyxl
17+
- psycopg2
18+
- pymysql
19+
- pytables
20+
- python-dateutil
21+
- python=3.6*
22+
- pytz
23+
- s3fs
24+
- scipy
25+
- sqlalchemy
26+
- xarray
27+
- xlrd
28+
- xlsxwriter
29+
- xlwt
30+
# universal
31+
- pytest
32+
- pytest-xdist
33+
- moto

ci/circle-36-locale_slow.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: pandas
2+
channels:
3+
- defaults
4+
- conda-forge
5+
dependencies:
6+
- beautifulsoup4
7+
- cython
8+
- html5lib
9+
- ipython
10+
- jinja2
11+
- lxml
12+
- matplotlib
13+
- nomkl
14+
- numexpr
15+
- numpy
16+
- openpyxl
17+
- psycopg2
18+
- pymysql
19+
- pytables
20+
- python-dateutil
21+
- python=3.6*
22+
- pytz
23+
- s3fs
24+
- scipy
25+
- sqlalchemy
26+
- xarray
27+
- xlrd
28+
- xlsxwriter
29+
- xlwt
30+
# universal
31+
- pytest
32+
- pytest-xdist
33+
- moto

0 commit comments

Comments
 (0)