Skip to content

Commit 2669ee4

Browse files
author
How Si Wei
committed
Merge remote-tracking branch 'upstream/master' into businesshour
2 parents 1478845 + ea06f8d commit 2669ee4

File tree

128 files changed

+7119
-6207
lines changed

Some content is hidden

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

128 files changed

+7119
-6207
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://pandas.pydata.org/donate.html

.travis.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ matrix:
5151
# In allow_failures
5252
- dist: trusty
5353
env:
54-
- JOB="3.6, doc" ENV_FILE="environment.yml" DOC=true
54+
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
5555
allow_failures:
5656
- dist: trusty
5757
env:
5858
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow"
5959
- dist: trusty
6060
env:
61-
- JOB="3.6, doc" ENV_FILE="environment.yml" DOC=true
61+
- JOB="3.6, doc" ENV_FILE="ci/deps/travis-36-doc.yaml" DOC=true
6262

6363
before_install:
6464
- echo "before_install"
@@ -103,10 +103,5 @@ script:
103103
after_script:
104104
- echo "after_script start"
105105
- source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
106-
- if [ -e test-data-single.xml ]; then
107-
ci/print_skipped.py test-data-single.xml;
108-
fi
109-
- if [ -e test-data-multiple.xml ]; then
110-
ci/print_skipped.py test-data-multiple.xml;
111-
fi
106+
- ci/print_skipped.py
112107
- echo "after_script done"

asv_bench/asv.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
// `asv` will cache wheels of the recent builds in each
108108
// environment, making them faster to install next time. This is
109109
// number of builds to keep, per environment.
110-
"wheel_cache_size": 8,
110+
"build_cache_size": 8,
111111

112112
// The commits after which the regression search in `asv publish`
113113
// should start looking for regressions. Dictionary whose keys are

asv_bench/benchmarks/index_object.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,34 @@ def time_get_loc(self):
188188

189189
class IntervalIndexMethod:
190190
# GH 24813
191-
params = [10**3, 10**5, 10**7]
191+
params = [10**3, 10**5]
192192

193193
def setup(self, N):
194194
left = np.append(np.arange(N), np.array(0))
195195
right = np.append(np.arange(1, N + 1), np.array(1))
196196
self.intv = IntervalIndex.from_arrays(left, right)
197197
self.intv._engine
198198

199+
self.intv2 = IntervalIndex.from_arrays(left + 1, right + 1)
200+
self.intv2._engine
201+
202+
self.left = IntervalIndex.from_breaks(np.arange(N))
203+
self.right = IntervalIndex.from_breaks(np.arange(N - 3, 2 * N - 3))
204+
199205
def time_monotonic_inc(self, N):
200206
self.intv.is_monotonic_increasing
201207

202208
def time_is_unique(self, N):
203209
self.intv.is_unique
204210

211+
def time_intersection(self, N):
212+
self.left.intersection(self.right)
213+
214+
def time_intersection_one_duplicate(self, N):
215+
self.intv.intersection(self.right)
216+
217+
def time_intersection_both_duplicate(self, N):
218+
self.intv.intersection(self.intv2)
219+
205220

206221
from .pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/multiindex_object.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import numpy as np
44
import pandas.util.testing as tm
5-
from pandas import date_range, MultiIndex
5+
from pandas import date_range, MultiIndex, DataFrame
66

77

88
class GetLoc:
@@ -126,4 +126,18 @@ def time_datetime_level_values_sliced(self, mi):
126126
mi[:10].values
127127

128128

129+
class CategoricalLevel:
130+
131+
def setup(self):
132+
133+
self.df = DataFrame({
134+
'a': np.arange(1_000_000, dtype=np.int32),
135+
'b': np.arange(1_000_000, dtype=np.int64),
136+
'c': np.arange(1_000_000, dtype=float),
137+
}).astype({'a': 'category', 'b': 'category'})
138+
139+
def time_categorical_level(self):
140+
self.df.set_index(['a', 'b'])
141+
142+
129143
from .pandas_vb_common import setup # noqa: F401

asv_bench/benchmarks/timeseries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pandas import to_datetime, date_range, Series, DataFrame, period_range
66
from pandas.tseries.frequencies import infer_freq
77
try:
8-
from pandas.plotting._converter import DatetimeConverter
8+
from pandas.plotting._matplotlib.converter import DatetimeConverter
99
except ImportError:
1010
from pandas.tseries.converter import DatetimeConverter
1111

ci/azure/posix.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,9 @@ jobs:
8989
# note that this will produce $LASTEXITCODE=1
9090
Write-Error "$($matches[1]) tests failed"
9191
}
92-
displayName: Check for test failures
92+
displayName: 'Check for test failures'
93+
- script: |
94+
export PATH=$HOME/miniconda3/bin:$PATH
95+
source activate pandas-dev
96+
python ci/print_skipped.py
97+
displayName: 'Print skipped tests'

ci/azure/windows.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818

1919
steps:
2020
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
21-
displayName: Add conda to PATH
21+
displayName: 'Add conda to PATH'
2222
- script: conda update -q -n base conda
2323
displayName: Update conda
2424
- script: conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
25-
displayName: Create anaconda environment
25+
displayName: 'Create anaconda environment'
2626
- script: |
2727
call activate pandas-dev
2828
call conda list
@@ -48,4 +48,9 @@ jobs:
4848
# note that this will produce $LASTEXITCODE=1
4949
Write-Error "$($matches[1]) tests failed"
5050
}
51-
displayName: Check for test failures
51+
displayName: 'Check for test failures'
52+
- script: |
53+
export PATH=$HOME/miniconda3/bin:$PATH
54+
source activate pandas-dev
55+
python ci/print_skipped.py
56+
displayName: 'Print skipped tests'

ci/deps/azure-35-compat.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ dependencies:
2222
- hypothesis>=3.58.0
2323
- pytest-xdist
2424
- pytest-mock
25-
- isort
2625
- pip
2726
- pip:
2827
# for python 3.5, pytest>=4.0.2 is not available in conda

ci/deps/azure-36-locale.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ dependencies:
2424
- pytest-xdist
2525
- pytest-mock
2626
- hypothesis>=3.58.0
27-
- isort
2827
- pip
2928
- pip:
3029
- html5lib==1.0b2

0 commit comments

Comments
 (0)