Skip to content

Commit f01142c

Browse files
author
Christopher C. Aycock
committed
Merge master branch
2 parents 75157fc + 1b0333b commit f01142c

File tree

131 files changed

+2632
-20782
lines changed

Some content is hidden

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

131 files changed

+2632
-20782
lines changed

.github/ISSUE_TEMPLATE.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
#### A small, complete example of the issue
1+
#### Code Sample, a copy-pastable example if possible
22

33
```python
44
# Your code here
55

66
```
7+
#### Problem description
8+
9+
[this should explain **why** the current behaviour is a problem and why the expected output is a better solution.]
710

811
#### Expected Output
912

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
*.class
2828
*.dll
2929
*.exe
30+
*.pxi
3031
*.o
3132
*.py[ocd]
3233
*.so

.travis.yml

+55-13
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,11 @@ cache:
1414

1515
env:
1616
global:
17-
# scatterci API key
18-
#- secure: "Bx5umgo6WjuGY+5XFa004xjCiX/vq0CyMZ/ETzcs7EIBI1BE/0fIDXOoWhoxbY9HPfdPGlDnDgB9nGqr5wArO2s+BavyKBWg6osZ3dmkfuJPMOWeyCa92EeP+sfKw8e5HSU5MizW9e319wHWOF/xkzdHR7T67Qd5erhv91x4DnQ="
19-
# ironcache API key
20-
#- secure: "e4eEFn9nDQc3Xa5BWYkzfX37jaWVq89XidVX+rcCNEr5OlOImvveeXnF1IzbRXznH4Sv0YsLwUd8RGUWOmyCvkONq/VJeqCHWtTMyfaCIdqSyhIP9Odz8r9ahch+Y0XFepBey92AJHmlnTh+2GjCDgIiqq4fzglojnp56Vg1ojA="
21-
#- secure: "CjmYmY5qEu3KrvMtel6zWFEtMq8ORBeS1S1odJHnjQpbwT1KY2YFZRVlLphfyDQXSz6svKUdeRrCNp65baBzs3DQNA8lIuXGIBYFeJxqVGtYAZZs6+TzBPfJJK798sGOj5RshrOJkFG2rdlWNuTq/XphI0JOrN3nPUkRrdQRpAw="
22-
# pandas-docs-bot GH
23-
- secure: "PCzUFR8CHmw9lH84p4ygnojdF7Z8U5h7YfY0RyT+5K/aiQ1ZTU3ZkDTPI0/rR5FVMxsEEKEQKMcc5fvqW0PeD7Q2wRmluloKgT9w4EVEJ1ppKf7lITPcvZR2QgVOvjv4AfDtibLHFNiaSjzoqyJVjM4igjOu8WTlF3JfZcmOQjQ="
17+
18+
# pandas-docs-travis GH
19+
- secure: "U4GkUaX0K5FqHsHlxXiTr53t0zg8l9p3x7Xze3T0l4mEfhJdqVjayizRE0w0Uo3D54YY7X4lCRtI+bzFz20RxAEoEUyIoWtlUP7eNY3XuhViipY7gtYJpS+68VN5MnChzzz73cNj89fLBvCFyYhMTXHSrbm+yHSg6eRlqzzhHWc="
20+
21+
## original key - secure: "PCzUFR8CHmw9lH84p4ygnojdF7Z8U5h7YfY0RyT+5K/aiQ1ZTU3ZkDTPI0/rR5FVMxsEEKEQKMcc5fvqW0PeD7Q2wRmluloKgT9w4EVEJ1ppKf7lITPcvZR2QgVOvjv4AfDtibLHFNiaSjzoqyJVjM4igjOu8WTlF3JfZcmOQjQ="
2422

2523
git:
2624
# for cloning
@@ -34,6 +32,7 @@ matrix:
3432
compiler: clang
3533
osx_image: xcode6.4
3634
env:
35+
- PYTHON_VERSION=3.5
3736
- JOB_NAME: "35_osx"
3837
- NOSE_ARGS="not slow and not network and not disabled"
3938
- BUILD_TYPE=conda
@@ -43,6 +42,7 @@ matrix:
4342
- USE_CACHE=true
4443
- python: 2.7
4544
env:
45+
- PYTHON_VERSION=2.7
4646
- JOB_NAME: "27_slow_nnet_LOCALE"
4747
- NOSE_ARGS="slow and not network and not disabled"
4848
- LOCALE_OVERRIDE="zh_CN.UTF-8"
@@ -56,6 +56,7 @@ matrix:
5656
- language-pack-zh-hans
5757
- python: 2.7
5858
env:
59+
- PYTHON_VERSION=2.7
5960
- JOB_NAME: "27_nslow"
6061
- NOSE_ARGS="not slow and not disabled"
6162
- FULL_DEPS=true
@@ -69,6 +70,7 @@ matrix:
6970
- python-gtk2
7071
- python: 3.4
7172
env:
73+
- PYTHON_VERSION=3.4
7274
- JOB_NAME: "34_nslow"
7375
- NOSE_ARGS="not slow and not disabled"
7476
- FULL_DEPS=true
@@ -81,6 +83,7 @@ matrix:
8183
- xsel
8284
- python: 3.5
8385
env:
86+
- PYTHON_VERSION=3.5
8487
- JOB_NAME: "35_nslow"
8588
- NOSE_ARGS="not slow and not network and not disabled"
8689
- FULL_DEPS=true
@@ -95,6 +98,7 @@ matrix:
9598
# In allow_failures
9699
- python: 2.7
97100
env:
101+
- PYTHON_VERSION=2.7
98102
- JOB_NAME: "27_slow"
99103
- JOB_TAG=_SLOW
100104
- NOSE_ARGS="slow and not network and not disabled"
@@ -104,6 +108,7 @@ matrix:
104108
# In allow_failures
105109
- python: 3.4
106110
env:
111+
- PYTHON_VERSION=3.4
107112
- JOB_NAME: "34_slow"
108113
- JOB_TAG=_SLOW
109114
- NOSE_ARGS="slow and not network and not disabled"
@@ -118,16 +123,31 @@ matrix:
118123
# In allow_failures
119124
- python: 2.7
120125
env:
126+
- PYTHON_VERSION=2.7
121127
- JOB_NAME: "27_build_test_conda"
122128
- JOB_TAG=_BUILD_TEST
123129
- NOSE_ARGS="not slow and not disabled"
124130
- FULL_DEPS=true
125131
- BUILD_TEST=true
126132
- CACHE_NAME="27_build_test_conda"
127133
- USE_CACHE=true
134+
# In allow_failures
135+
- python: 3.6-dev
136+
env:
137+
- PYTHON_VERSION=3.6
138+
- JOB_NAME: "36_dev"
139+
- JOB_TAG=_DEV
140+
- NOSE_ARGS="not slow and not network and not disabled"
141+
- PANDAS_TESTING_MODE="deprecate"
142+
addons:
143+
apt:
144+
packages:
145+
- libatlas-base-dev
146+
- gfortran
128147
# In allow_failures
129148
- python: 3.5
130149
env:
150+
- PYTHON_VERSION=3.5
131151
- JOB_NAME: "35_numpy_dev"
132152
- JOB_TAG=_NUMPY_DEV
133153
- NOSE_ARGS="not slow and not network and not disabled"
@@ -142,6 +162,7 @@ matrix:
142162
# In allow_failures
143163
- python: 2.7
144164
env:
165+
- PYTHON_VERSION=2.7
145166
- JOB_NAME: "27_nslow_nnet_COMPAT"
146167
- NOSE_ARGS="not slow and not network and not disabled"
147168
- LOCALE_OVERRIDE="it_IT.UTF-8"
@@ -156,6 +177,7 @@ matrix:
156177
# In allow_failures
157178
- python: 3.5
158179
env:
180+
- PYTHON_VERSION=3.5
159181
- JOB_NAME: "35_ascii"
160182
- JOB_TAG=_ASCII
161183
- NOSE_ARGS="not slow and not network and not disabled"
@@ -165,6 +187,7 @@ matrix:
165187
# In allow_failures
166188
- python: 2.7
167189
env:
190+
- PYTHON_VERSION=2.7
168191
- JOB_NAME: "doc_build"
169192
- FULL_DEPS=true
170193
- DOC_BUILD=true
@@ -174,6 +197,7 @@ matrix:
174197
allow_failures:
175198
- python: 2.7
176199
env:
200+
- PYTHON_VERSION=2.7
177201
- JOB_NAME: "27_slow"
178202
- JOB_TAG=_SLOW
179203
- NOSE_ARGS="slow and not network and not disabled"
@@ -182,6 +206,7 @@ matrix:
182206
- USE_CACHE=true
183207
- python: 3.4
184208
env:
209+
- PYTHON_VERSION=3.4
185210
- JOB_NAME: "34_slow"
186211
- JOB_TAG=_SLOW
187212
- NOSE_ARGS="slow and not network and not disabled"
@@ -195,28 +220,43 @@ matrix:
195220
- xsel
196221
- python: 2.7
197222
env:
223+
- PYTHON_VERSION=2.7
198224
- JOB_NAME: "27_build_test_conda"
199225
- JOB_TAG=_BUILD_TEST
200226
- NOSE_ARGS="not slow and not disabled"
201227
- FULL_DEPS=true
202228
- BUILD_TEST=true
203229
- CACHE_NAME="27_build_test_conda"
204230
- USE_CACHE=true
205-
- python: 3.5
231+
- python: 3.6-dev
206232
env:
207-
- JOB_NAME: "35_numpy_dev"
208-
- JOB_TAG=_NUMPY_DEV
233+
- PYTHON_VERSION=3.6
234+
- JOB_NAME: "36_dev"
235+
- JOB_TAG=_DEV
209236
- NOSE_ARGS="not slow and not network and not disabled"
210237
- PANDAS_TESTING_MODE="deprecate"
211-
- CACHE_NAME="35_numpy_dev"
212-
- USE_CACHE=true
238+
addons:
239+
apt:
240+
packages:
241+
- libatlas-base-dev
242+
- gfortran
243+
- python: 3.5
244+
env:
245+
- PYTHON_VERSION=3.5
246+
- JOB_NAME: "35_numpy_dev"
247+
- JOB_TAG=_NUMPY_DEV
248+
- NOSE_ARGS="not slow and not network and not disabled"
249+
- PANDAS_TESTING_MODE="deprecate"
250+
- CACHE_NAME="35_numpy_dev"
251+
- USE_CACHE=true
213252
addons:
214253
apt:
215254
packages:
216255
- libatlas-base-dev
217256
- gfortran
218257
- python: 2.7
219258
env:
259+
- PYTHON_VERSION=2.7
220260
- JOB_NAME: "27_nslow_nnet_COMPAT"
221261
- NOSE_ARGS="not slow and not network and not disabled"
222262
- LOCALE_OVERRIDE="it_IT.UTF-8"
@@ -230,6 +270,7 @@ matrix:
230270
- language-pack-it
231271
- python: 3.5
232272
env:
273+
- PYTHON_VERSION=3.5
233274
- JOB_NAME: "35_ascii"
234275
- JOB_TAG=_ASCII
235276
- NOSE_ARGS="not slow and not network and not disabled"
@@ -238,6 +279,7 @@ matrix:
238279
- USE_CACHE=true
239280
- python: 2.7
240281
env:
282+
- PYTHON_VERSION=2.7
241283
- JOB_NAME: "doc_build"
242284
- FULL_DEPS=true
243285
- DOC_BUILD=true
@@ -249,7 +291,7 @@ before_install:
249291
- echo "before_install"
250292
- source ci/travis_process_gbq_encryption.sh
251293
- echo $VIRTUAL_ENV
252-
- export PATH="$HOME/miniconda/bin:$PATH"
294+
- export PATH="$HOME/miniconda3/bin:$PATH"
253295
- df -h
254296
- date
255297
- pwd

asv_bench/benchmarks/algorithms.py

+33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22
import pandas as pd
3+
from pandas.util import testing as tm
34

45

56
class algorithm(object):
@@ -55,3 +56,35 @@ def time_add_overflow_neg_arr(self):
5556

5657
def time_add_overflow_mixed_arr(self):
5758
self.checked_add(self.arr, self.arrmixed)
59+
60+
61+
class hashing(object):
62+
goal_time = 0.2
63+
64+
def setup(self):
65+
N = 100000
66+
67+
self.df = pd.DataFrame(
68+
{'A': pd.Series(tm.makeStringIndex(100).take(
69+
np.random.randint(0, 100, size=N))),
70+
'B': pd.Series(tm.makeStringIndex(10000).take(
71+
np.random.randint(0, 10000, size=N))),
72+
'D': np.random.randn(N),
73+
'E': np.arange(N),
74+
'F': pd.date_range('20110101', freq='s', periods=N),
75+
'G': pd.timedelta_range('1 day', freq='s', periods=N),
76+
})
77+
self.df['C'] = self.df['B'].astype('category')
78+
self.df.iloc[10:20] = np.nan
79+
80+
def time_frame(self):
81+
self.df.hash()
82+
83+
def time_series_int(self):
84+
self.df.E.hash()
85+
86+
def time_series_string(self):
87+
self.df.B.hash()
88+
89+
def time_series_categorical(self):
90+
self.df.C.hash()

asv_bench/benchmarks/replace.py

+24
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,30 @@ def time_replace_large_dict(self):
3232
self.s.replace(self.to_rep, inplace=True)
3333

3434

35+
class replace_convert(object):
36+
goal_time = 0.5
37+
38+
def setup(self):
39+
self.n = (10 ** 3)
40+
self.to_ts = dict(((i, pd.Timestamp(i)) for i in range(self.n)))
41+
self.to_td = dict(((i, pd.Timedelta(i)) for i in range(self.n)))
42+
self.s = Series(np.random.randint(self.n, size=(10 ** 3)))
43+
self.df = DataFrame({'A': np.random.randint(self.n, size=(10 ** 3)),
44+
'B': np.random.randint(self.n, size=(10 ** 3))})
45+
46+
def time_replace_series_timestamp(self):
47+
self.s.replace(self.to_ts)
48+
49+
def time_replace_series_timedelta(self):
50+
self.s.replace(self.to_td)
51+
52+
def time_replace_frame_timestamp(self):
53+
self.df.replace(self.to_ts)
54+
55+
def time_replace_frame_timedelta(self):
56+
self.df.replace(self.to_td)
57+
58+
3559
class replace_replacena(object):
3660
goal_time = 0.2
3761

ci/install-2.7_NUMPY_DEV.sh

-18
This file was deleted.

ci/install-3.6_DEV.sh

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
echo "install 3.6 dev"
4+
5+
conda config --set add_pip_as_python_dependency false
6+
conda create -n pandas python=3.6 -c conda-forge/label/prerelease
7+
8+
source activate pandas
9+
10+
# ensure we have pip
11+
python -m ensurepip
12+
13+
# install deps
14+
pip3.6 install nose cython numpy pytz python-dateutil
15+
16+
true

0 commit comments

Comments
 (0)