Skip to content

Commit 945ec14

Browse files
authored
Merge branch 'master' into tdi_plot_fix
2 parents 7db61ec + f62e8f2 commit 945ec14

File tree

743 files changed

+33623
-37522
lines changed

Some content is hidden

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

743 files changed

+33623
-37522
lines changed

.github/CONTRIBUTING.md

+14-505
Large diffs are not rendered by default.

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
.noseids
2020
.ipynb_checkpoints
2121
.tags
22+
.cache/
2223

2324
# Compiled source #
2425
###################
@@ -56,6 +57,8 @@ dist
5657
**/wheelhouse/*
5758
# coverage
5859
.coverage
60+
coverage.xml
61+
coverage_html_report
5962

6063
# OS generated files #
6164
######################

.travis.yml

+28-22
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ matrix:
3232
env:
3333
- PYTHON_VERSION=3.5
3434
- JOB_NAME: "35_osx"
35-
- NOSE_ARGS="not slow and not network and not disabled"
35+
- TEST_ARGS="--skip-slow --skip-network"
3636
- BUILD_TYPE=conda
3737
- JOB_TAG=_OSX
3838
- TRAVIS_PYTHON_VERSION=3.5
@@ -42,7 +42,7 @@ matrix:
4242
env:
4343
- PYTHON_VERSION=2.7
4444
- JOB_NAME: "27_slow_nnet_LOCALE"
45-
- NOSE_ARGS="slow and not network and not disabled"
45+
- TEST_ARGS="--only-slow --skip-network"
4646
- LOCALE_OVERRIDE="zh_CN.UTF-8"
4747
- FULL_DEPS=true
4848
- JOB_TAG=_LOCALE
@@ -56,7 +56,7 @@ matrix:
5656
env:
5757
- PYTHON_VERSION=2.7
5858
- JOB_NAME: "27_nslow"
59-
- NOSE_ARGS="not slow and not disabled"
59+
- TEST_ARGS="--skip-slow"
6060
- FULL_DEPS=true
6161
- CLIPBOARD_GUI=gtk2
6262
- LINT=true
@@ -70,7 +70,7 @@ matrix:
7070
env:
7171
- PYTHON_VERSION=3.5
7272
- JOB_NAME: "35_nslow"
73-
- NOSE_ARGS="not slow and not network and not disabled"
73+
- TEST_ARGS="--skip-slow --skip-network"
7474
- FULL_DEPS=true
7575
- CLIPBOARD=xsel
7676
- COVERAGE=true
@@ -84,7 +84,7 @@ matrix:
8484
env:
8585
- PYTHON_VERSION=3.6
8686
- JOB_NAME: "36"
87-
- NOSE_ARGS="not slow and not network and not disabled"
87+
- TEST_ARGS="--skip-slow --skip-network"
8888
- PANDAS_TESTING_MODE="deprecate"
8989
addons:
9090
apt:
@@ -96,7 +96,7 @@ matrix:
9696
env:
9797
- PYTHON_VERSION=2.7
9898
- JOB_NAME: "27_nslow_nnet_COMPAT"
99-
- NOSE_ARGS="not slow and not network and not disabled"
99+
- TEST_ARGS="--skip-slow --skip-network"
100100
- LOCALE_OVERRIDE="it_IT.UTF-8"
101101
- INSTALL_TEST=true
102102
- JOB_TAG=_COMPAT
@@ -112,7 +112,7 @@ matrix:
112112
- PYTHON_VERSION=2.7
113113
- JOB_NAME: "27_slow"
114114
- JOB_TAG=_SLOW
115-
- NOSE_ARGS="slow and not network and not disabled"
115+
- TEST_ARGS="--only-slow --skip-network"
116116
- FULL_DEPS=true
117117
- CACHE_NAME="27_slow"
118118
- USE_CACHE=true
@@ -122,7 +122,7 @@ matrix:
122122
- PYTHON_VERSION=2.7
123123
- JOB_NAME: "27_build_test_conda"
124124
- JOB_TAG=_BUILD_TEST
125-
- NOSE_ARGS="not slow and not disabled"
125+
- TEST_ARGS="--skip-slow"
126126
- FULL_DEPS=true
127127
- BUILD_TEST=true
128128
- CACHE_NAME="27_build_test_conda"
@@ -132,7 +132,8 @@ matrix:
132132
env:
133133
- PYTHON_VERSION=3.4
134134
- JOB_NAME: "34_nslow"
135-
- NOSE_ARGS="not slow and not disabled"
135+
- LOCALE_OVERRIDE="zh_CN.UTF-8"
136+
- TEST_ARGS="--skip-slow"
136137
- FULL_DEPS=true
137138
- CLIPBOARD=xsel
138139
- CACHE_NAME="34_nslow"
@@ -141,13 +142,14 @@ matrix:
141142
apt:
142143
packages:
143144
- xsel
145+
- language-pack-zh-hans
144146
# In allow_failures
145147
- python: 3.4
146148
env:
147149
- PYTHON_VERSION=3.4
148150
- JOB_NAME: "34_slow"
149151
- JOB_TAG=_SLOW
150-
- NOSE_ARGS="slow and not network and not disabled"
152+
- TEST_ARGS="--only-slow --skip-network"
151153
- FULL_DEPS=true
152154
- CLIPBOARD=xsel
153155
- CACHE_NAME="34_slow"
@@ -162,7 +164,7 @@ matrix:
162164
- PYTHON_VERSION=3.5
163165
- JOB_NAME: "35_numpy_dev"
164166
- JOB_TAG=_NUMPY_DEV
165-
- NOSE_ARGS="not slow and not network and not disabled"
167+
- TEST_ARGS="--skip-slow --skip-network"
166168
- PANDAS_TESTING_MODE="deprecate"
167169
- CACHE_NAME="35_numpy_dev"
168170
- USE_CACHE=true
@@ -177,7 +179,7 @@ matrix:
177179
- PYTHON_VERSION=3.5
178180
- JOB_NAME: "35_ascii"
179181
- JOB_TAG=_ASCII
180-
- NOSE_ARGS="not slow and not network and not disabled"
182+
- TEST_ARGS="--skip-slow --skip-network"
181183
- LOCALE_OVERRIDE="C"
182184
- CACHE_NAME="35_ascii"
183185
- USE_CACHE=true
@@ -197,7 +199,7 @@ matrix:
197199
- PYTHON_VERSION=2.7
198200
- JOB_NAME: "27_slow"
199201
- JOB_TAG=_SLOW
200-
- NOSE_ARGS="slow and not network and not disabled"
202+
- TEST_ARGS="--only-slow --skip-network"
201203
- FULL_DEPS=true
202204
- CACHE_NAME="27_slow"
203205
- USE_CACHE=true
@@ -206,7 +208,7 @@ matrix:
206208
- PYTHON_VERSION=3.4
207209
- JOB_NAME: "34_slow"
208210
- JOB_TAG=_SLOW
209-
- NOSE_ARGS="slow and not network and not disabled"
211+
- TEST_ARGS="--only-slow --skip-network"
210212
- FULL_DEPS=true
211213
- CLIPBOARD=xsel
212214
- CACHE_NAME="34_slow"
@@ -220,7 +222,7 @@ matrix:
220222
- PYTHON_VERSION=2.7
221223
- JOB_NAME: "27_build_test_conda"
222224
- JOB_TAG=_BUILD_TEST
223-
- NOSE_ARGS="not slow and not disabled"
225+
- TEST_ARGS="--skip-slow"
224226
- FULL_DEPS=true
225227
- BUILD_TEST=true
226228
- CACHE_NAME="27_build_test_conda"
@@ -229,7 +231,8 @@ matrix:
229231
env:
230232
- PYTHON_VERSION=3.4
231233
- JOB_NAME: "34_nslow"
232-
- NOSE_ARGS="not slow and not disabled"
234+
- LOCALE_OVERRIDE="zh_CN.UTF-8"
235+
- TEST_ARGS="--skip-slow"
233236
- FULL_DEPS=true
234237
- CLIPBOARD=xsel
235238
- CACHE_NAME="34_nslow"
@@ -238,12 +241,13 @@ matrix:
238241
apt:
239242
packages:
240243
- xsel
244+
- language-pack-zh-hans
241245
- python: 3.5
242246
env:
243247
- PYTHON_VERSION=3.5
244248
- JOB_NAME: "35_numpy_dev"
245249
- JOB_TAG=_NUMPY_DEV
246-
- NOSE_ARGS="not slow and not network and not disabled"
250+
- TEST_ARGS="--skip-slow --skip-network"
247251
- PANDAS_TESTING_MODE="deprecate"
248252
- CACHE_NAME="35_numpy_dev"
249253
- USE_CACHE=true
@@ -256,7 +260,7 @@ matrix:
256260
env:
257261
- PYTHON_VERSION=2.7
258262
- JOB_NAME: "27_nslow_nnet_COMPAT"
259-
- NOSE_ARGS="not slow and not network and not disabled"
263+
- TEST_ARGS="--skip-slow --skip-network"
260264
- LOCALE_OVERRIDE="it_IT.UTF-8"
261265
- INSTALL_TEST=true
262266
- JOB_TAG=_COMPAT
@@ -271,7 +275,7 @@ matrix:
271275
- PYTHON_VERSION=3.5
272276
- JOB_NAME: "35_ascii"
273277
- JOB_TAG=_ASCII
274-
- NOSE_ARGS="not slow and not network and not disabled"
278+
- TEST_ARGS="--skip-slow --skip-network"
275279
- LOCALE_OVERRIDE="C"
276280
- CACHE_NAME="35_ascii"
277281
- USE_CACHE=true
@@ -311,12 +315,13 @@ install:
311315

312316
before_script:
313317
- source activate pandas && pip install codecov
314-
- ci/install_db.sh
318+
- ci/install_db_travis.sh
315319

316320
script:
317321
- echo "script start"
318322
- ci/run_build_docs.sh
319-
- ci/script.sh
323+
- ci/script_single.sh
324+
- ci/script_multi.sh
320325
- ci/lint.sh
321326
- echo "script done"
322327

@@ -327,5 +332,6 @@ after_script:
327332
- echo "after_script start"
328333
- ci/install_test.sh
329334
- source activate pandas && python -c "import pandas; pandas.show_versions();"
330-
- ci/print_skipped.py /tmp/nosetests.xml
335+
- ci/print_skipped.py /tmp/single.xml
336+
- ci/print_skipped.py /tmp/multiple.xml
331337
- echo "after_script done"

MANIFEST.in

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ include setup.py
77
graft doc
88
prune doc/build
99

10-
graft examples
1110
graft pandas
1211

1312
global-exclude *.so

appveyor.yml

+11-14
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,23 @@ environment:
1414
# /E:ON and /V:ON options are not enabled in the batch script intepreter
1515
# See: http://stackoverflow.com/a/13751649/163740
1616
CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\ci\\run_with_env.cmd"
17+
clone_folder: C:\projects\pandas
1718

1819
matrix:
1920

20-
- CONDA_ROOT: "C:\\Miniconda3.5_64"
21+
- CONDA_ROOT: "C:\\Miniconda3_64"
2122
PYTHON_VERSION: "3.6"
2223
PYTHON_ARCH: "64"
2324
CONDA_PY: "36"
24-
CONDA_NPY: "111"
25+
CONDA_NPY: "112"
2526

26-
- CONDA_ROOT: "C:\\Miniconda3.5_64"
27+
- CONDA_ROOT: "C:\\Miniconda3_64"
2728
PYTHON_VERSION: "2.7"
2829
PYTHON_ARCH: "64"
2930
CONDA_PY: "27"
3031
CONDA_NPY: "110"
3132

32-
- CONDA_ROOT: "C:\\Miniconda3.5_64"
33+
- CONDA_ROOT: "C:\\Miniconda3_64"
3334
PYTHON_VERSION: "3.5"
3435
PYTHON_ARCH: "64"
3536
CONDA_PY: "35"
@@ -65,8 +66,7 @@ install:
6566

6667
# install our build environment
6768
- cmd: conda config --set show_channel_urls true --set always_yes true --set changeps1 false
68-
#- cmd: conda update -q conda
69-
- cmd: conda install conda=4.2.15
69+
- cmd: conda update -q conda
7070
- cmd: conda config --set ssl_verify false
7171

7272
# add the pandas channel *before* defaults to have defaults take priority
@@ -78,22 +78,19 @@ install:
7878
# this is now the downloaded conda...
7979
- cmd: conda info -a
8080

81-
# build em using the local source checkout in the correct windows env
82-
- cmd: '%CMD_IN_ENV% conda build ci\appveyor.recipe -q'
83-
8481
# create our env
85-
- cmd: conda create -q -n pandas python=%PYTHON_VERSION% nose
82+
- cmd: conda create -q -n pandas python=%PYTHON_VERSION% cython pytest
8683
- cmd: activate pandas
8784
- SET REQ=ci\requirements-%PYTHON_VERSION%-%PYTHON_ARCH%.run
8885
- cmd: echo "installing requirements from %REQ%"
8986
- cmd: conda install -n pandas -q --file=%REQ%
9087
- cmd: conda list -n pandas
9188
- cmd: echo "installing requirements from %REQ% - done"
92-
- ps: conda install -n pandas (conda build ci\appveyor.recipe -q --output)
89+
90+
# build em using the local source checkout in the correct windows env
91+
- cmd: '%CMD_IN_ENV% python setup.py build_ext --inplace'
9392

9493
test_script:
9594
# tests
96-
- cd \
9795
- cmd: activate pandas
98-
- cmd: conda list
99-
- cmd: nosetests --exe -A "not slow and not network and not disabled" pandas
96+
- cmd: test.bat

asv_bench/benchmarks/frame_methods.py

+14
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,20 @@ def time_frame_from_records_generator_nrows(self):
433433

434434

435435

436+
#-----------------------------------------------------------------------------
437+
# nunique
438+
439+
class frame_nunique(object):
440+
441+
def setup(self):
442+
self.data = np.random.randn(10000, 1000)
443+
self.df = DataFrame(self.data)
444+
445+
def time_frame_nunique(self):
446+
self.df.nunique()
447+
448+
449+
436450
#-----------------------------------------------------------------------------
437451
# duplicated
438452

asv_bench/benchmarks/groupby.py

+16
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,22 @@ def time_groupby_int_count(self):
251251
self.df.groupby(['key1', 'key2']).count()
252252

253253

254+
#----------------------------------------------------------------------
255+
# nunique() speed
256+
257+
class groupby_nunique(object):
258+
259+
def setup(self):
260+
self.n = 10000
261+
self.df = DataFrame({'key1': randint(0, 500, size=self.n),
262+
'key2': randint(0, 100, size=self.n),
263+
'ints': randint(0, 1000, size=self.n),
264+
'ints2': randint(0, 1000, size=self.n), })
265+
266+
def time_groupby_nunique(self):
267+
self.df.groupby(['key1', 'key2']).nunique()
268+
269+
254270
#----------------------------------------------------------------------
255271
# group with different functions per column
256272

asv_bench/benchmarks/indexing.py

+28-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def setup(self):
8888

8989
def time_getitem_scalar(self):
9090
self.ts[self.dt]
91-
91+
9292

9393
class DataFrameIndexing(object):
9494
goal_time = 0.2
@@ -189,6 +189,15 @@ def setup(self):
189189
self.eps_C = 5
190190
self.eps_D = 5000
191191
self.mdt2 = self.mdt.set_index(['A', 'B', 'C', 'D']).sortlevel()
192+
self.miint = MultiIndex.from_product(
193+
[np.arange(1000),
194+
np.arange(1000)], names=['one', 'two'])
195+
196+
import string
197+
self.mistring = MultiIndex.from_product(
198+
[np.arange(1000),
199+
np.arange(20), list(string.ascii_letters)],
200+
names=['one', 'two', 'three'])
192201

193202
def time_series_xs_mi_ix(self):
194203
self.s.ix[999]
@@ -197,7 +206,24 @@ def time_frame_xs_mi_ix(self):
197206
self.df.ix[999]
198207

199208
def time_multiindex_slicers(self):
200-
self.mdt2.loc[self.idx[(self.test_A - self.eps_A):(self.test_A + self.eps_A), (self.test_B - self.eps_B):(self.test_B + self.eps_B), (self.test_C - self.eps_C):(self.test_C + self.eps_C), (self.test_D - self.eps_D):(self.test_D + self.eps_D)], :]
209+
self.mdt2.loc[self.idx[
210+
(self.test_A - self.eps_A):(self.test_A + self.eps_A),
211+
(self.test_B - self.eps_B):(self.test_B + self.eps_B),
212+
(self.test_C - self.eps_C):(self.test_C + self.eps_C),
213+
(self.test_D - self.eps_D):(self.test_D + self.eps_D)], :]
214+
215+
def time_multiindex_get_indexer(self):
216+
self.miint.get_indexer(
217+
np.array([(0, 10), (0, 11), (0, 12),
218+
(0, 13), (0, 14), (0, 15),
219+
(0, 16), (0, 17), (0, 18),
220+
(0, 19)], dtype=object))
221+
222+
def time_multiindex_string_get_loc(self):
223+
self.mistring.get_loc((999, 19, 'Z'))
224+
225+
def time_is_monotonic(self):
226+
self.miint.is_monotonic
201227

202228

203229
class PanelIndexing(object):

0 commit comments

Comments
 (0)