Skip to content

Commit 879cf86

Browse files
committed
Resolved Merge Conflicts
2 parents dc8bb82 + f67aa13 commit 879cf86

File tree

465 files changed

+16131
-14992
lines changed

Some content is hidden

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

465 files changed

+16131
-14992
lines changed

.circleci/config.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ asv_bench/pandas/
101101
# Documentation generated files #
102102
#################################
103103
doc/source/generated
104+
doc/source/api/generated
104105
doc/source/_static
105106
doc/source/vbench
106107
doc/source/vbench.rst

.travis.yml

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ env:
2323

2424
git:
2525
# for cloning
26-
depth: 1500
26+
depth: 2000
2727

2828
matrix:
2929
fast_finish: true
@@ -34,32 +34,23 @@ matrix:
3434
include:
3535
- dist: trusty
3636
env:
37-
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="not slow and not network"
37+
- JOB="3.7" ENV_FILE="ci/deps/travis-37.yaml" PATTERN="(not slow and not network)"
3838

3939
- dist: trusty
4040
env:
41-
- JOB="2.7, locale, slow, old NumPy" ENV_FILE="ci/deps/travis-27-locale.yaml" LOCALE_OVERRIDE="zh_CN.UTF-8" PATTERN="slow"
42-
addons:
43-
apt:
44-
packages:
45-
- language-pack-zh-hans
46-
- dist: trusty
47-
env:
48-
- JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" PATTERN="not slow"
41+
- JOB="2.7" ENV_FILE="ci/deps/travis-27.yaml" PATTERN="(not slow or (single and db))"
4942
addons:
5043
apt:
5144
packages:
5245
- python-gtk2
46+
5347
- dist: trusty
5448
env:
55-
- JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36.yaml" PATTERN="not slow and not network" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
49+
- JOB="3.6, locale" ENV_FILE="ci/deps/travis-36-locale.yaml" PATTERN="((not slow and not network) or (single and db))" LOCALE_OVERRIDE="zh_CN.UTF-8"
50+
5651
- dist: trusty
5752
env:
58-
- JOB="3.7, NumPy dev" ENV_FILE="ci/deps/travis-37-numpydev.yaml" PATTERN="not slow and not network" TEST_ARGS="-W error" PANDAS_TESTING_MODE="deprecate"
59-
addons:
60-
apt:
61-
packages:
62-
- xsel
53+
- JOB="3.6, coverage" ENV_FILE="ci/deps/travis-36.yaml" PATTERN="((not slow and not network) or (single and db))" PANDAS_TESTING_MODE="deprecate" COVERAGE=true
6354

6455
# In allow_failures
6556
- dist: trusty

LICENSES/DATEUTIL_LICENSE

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Copyright 2017- Paul Ganssle <paul@ganssle.io>
2+
Copyright 2017- dateutil contributors (see AUTHORS file)
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
The above license applies to all contributions after 2017-12-01, as well as
17+
all contributions that have been re-licensed (see AUTHORS file for the list of
18+
contributors who have re-licensed their code).
19+
--------------------------------------------------------------------------------
20+
dateutil - Extensions to the standard Python datetime module.
21+
22+
Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
23+
Copyright (c) 2012-2014 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
24+
Copyright (c) 2014-2016 - Yaron de Leeuw <me@jarondl.net>
25+
Copyright (c) 2015- - Paul Ganssle <paul@ganssle.io>
26+
Copyright (c) 2015- - dateutil contributors (see AUTHORS file)
27+
28+
All rights reserved.
29+
30+
Redistribution and use in source and binary forms, with or without
31+
modification, are permitted provided that the following conditions are met:
32+
33+
* Redistributions of source code must retain the above copyright notice,
34+
this list of conditions and the following disclaimer.
35+
* Redistributions in binary form must reproduce the above copyright notice,
36+
this list of conditions and the following disclaimer in the documentation
37+
and/or other materials provided with the distribution.
38+
* Neither the name of the copyright holder nor the names of its
39+
contributors may be used to endorse or promote products derived from
40+
this software without specific prior written permission.
41+
42+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
43+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
44+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
45+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
46+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
47+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
48+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
49+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
50+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
51+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
52+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53+
54+
The above BSD License Applies to all code, even that also covered by Apache 2.0.

README.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@
4545
</a>
4646
</td>
4747
</tr>
48-
<tr>
49-
<td></td>
50-
<td>
51-
<a href="https://circleci.com/gh/pandas-dev/pandas">
52-
<img src="https://circleci.com/gh/circleci/mongofinil/tree/master.svg?style=shield&circle-token=223d8cafa7b02902c3e150242520af8944e34671" alt="circleci build status" />
53-
</a>
54-
</td>
55-
</tr>
5648
<tr>
5749
<td></td>
5850
<td>

asv_bench/benchmarks/frame_methods.py

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def setup(self):
103103
self.df2 = DataFrame(np.random.randn(N * 50, 10))
104104
self.df3 = DataFrame(np.random.randn(N, 5 * N),
105105
columns=['C' + str(c) for c in range(N * 5)])
106+
self.df4 = DataFrame(np.random.randn(N * 1000, 10))
106107

107108
def time_iteritems(self):
108109
# (monitor no-copying behaviour)
@@ -119,10 +120,70 @@ def time_iteritems_indexing(self):
119120
for col in self.df3:
120121
self.df3[col]
121122

123+
def time_itertuples_start(self):
124+
self.df4.itertuples()
125+
126+
def time_itertuples_read_first(self):
127+
next(self.df4.itertuples())
128+
122129
def time_itertuples(self):
123-
for row in self.df2.itertuples():
130+
for row in self.df4.itertuples():
131+
pass
132+
133+
def time_itertuples_to_list(self):
134+
list(self.df4.itertuples())
135+
136+
def mem_itertuples_start(self):
137+
return self.df4.itertuples()
138+
139+
def peakmem_itertuples_start(self):
140+
self.df4.itertuples()
141+
142+
def mem_itertuples_read_first(self):
143+
return next(self.df4.itertuples())
144+
145+
def peakmem_itertuples(self):
146+
for row in self.df4.itertuples():
147+
pass
148+
149+
def mem_itertuples_to_list(self):
150+
return list(self.df4.itertuples())
151+
152+
def peakmem_itertuples_to_list(self):
153+
list(self.df4.itertuples())
154+
155+
def time_itertuples_raw_start(self):
156+
self.df4.itertuples(index=False, name=None)
157+
158+
def time_itertuples_raw_read_first(self):
159+
next(self.df4.itertuples(index=False, name=None))
160+
161+
def time_itertuples_raw_tuples(self):
162+
for row in self.df4.itertuples(index=False, name=None):
124163
pass
125164

165+
def time_itertuples_raw_tuples_to_list(self):
166+
list(self.df4.itertuples(index=False, name=None))
167+
168+
def mem_itertuples_raw_start(self):
169+
return self.df4.itertuples(index=False, name=None)
170+
171+
def peakmem_itertuples_raw_start(self):
172+
self.df4.itertuples(index=False, name=None)
173+
174+
def peakmem_itertuples_raw_read_first(self):
175+
next(self.df4.itertuples(index=False, name=None))
176+
177+
def peakmem_itertuples_raw(self):
178+
for row in self.df4.itertuples(index=False, name=None):
179+
pass
180+
181+
def mem_itertuples_raw_to_list(self):
182+
return list(self.df4.itertuples(index=False, name=None))
183+
184+
def peakmem_itertuples_raw_to_list(self):
185+
list(self.df4.itertuples(index=False, name=None))
186+
126187
def time_iterrows(self):
127188
for row in self.df.iterrows():
128189
pass

asv_bench/benchmarks/period.py

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
from pandas import (DataFrame, Series, Period, PeriodIndex, date_range,
2-
period_range)
1+
from pandas import (
2+
DataFrame, Period, PeriodIndex, Series, date_range, period_range)
3+
from pandas.tseries.frequencies import to_offset
34

45

56
class PeriodProperties(object):
@@ -35,25 +36,48 @@ def time_asfreq(self, freq):
3536
self.per.asfreq('A')
3637

3738

39+
class PeriodConstructor(object):
40+
params = [['D'], [True, False]]
41+
param_names = ['freq', 'is_offset']
42+
43+
def setup(self, freq, is_offset):
44+
if is_offset:
45+
self.freq = to_offset(freq)
46+
else:
47+
self.freq = freq
48+
49+
def time_period_constructor(self, freq, is_offset):
50+
Period('2012-06-01', freq=freq)
51+
52+
3853
class PeriodIndexConstructor(object):
3954

40-
params = ['D']
41-
param_names = ['freq']
55+
params = [['D'], [True, False]]
56+
param_names = ['freq', 'is_offset']
4257

43-
def setup(self, freq):
58+
def setup(self, freq, is_offset):
4459
self.rng = date_range('1985', periods=1000)
4560
self.rng2 = date_range('1985', periods=1000).to_pydatetime()
4661
self.ints = list(range(2000, 3000))
47-
48-
def time_from_date_range(self, freq):
62+
self.daily_ints = date_range('1/1/2000', periods=1000,
63+
freq=freq).strftime('%Y%m%d').map(int)
64+
if is_offset:
65+
self.freq = to_offset(freq)
66+
else:
67+
self.freq = freq
68+
69+
def time_from_date_range(self, freq, is_offset):
4970
PeriodIndex(self.rng, freq=freq)
5071

51-
def time_from_pydatetime(self, freq):
72+
def time_from_pydatetime(self, freq, is_offset):
5273
PeriodIndex(self.rng2, freq=freq)
5374

54-
def time_from_ints(self, freq):
75+
def time_from_ints(self, freq, is_offset):
5576
PeriodIndex(self.ints, freq=freq)
5677

78+
def time_from_ints_daily(self, freq, is_offset):
79+
PeriodIndex(self.daily_ints, freq=freq)
80+
5781

5882
class DataFramePeriodColumn(object):
5983

@@ -94,7 +118,7 @@ def time_value_counts(self, typ):
94118
class Indexing(object):
95119

96120
def setup(self):
97-
self.index = PeriodIndex(start='1985', periods=1000, freq='D')
121+
self.index = period_range(start='1985', periods=1000, freq='D')
98122
self.series = Series(range(1000), index=self.index)
99123
self.period = self.index[500]
100124

asv_bench/benchmarks/stat_ops.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def setup(self, method, use_bottleneck):
106106
from pandas.core import nanops
107107
nanops._USE_BOTTLENECK = use_bottleneck
108108
self.df = pd.DataFrame(np.random.randn(1000, 30))
109+
self.df2 = pd.DataFrame(np.random.randn(1000, 30))
109110
self.s = pd.Series(np.random.randn(1000))
110111
self.s2 = pd.Series(np.random.randn(1000))
111112

@@ -115,6 +116,12 @@ def time_corr(self, method, use_bottleneck):
115116
def time_corr_series(self, method, use_bottleneck):
116117
self.s.corr(self.s2, method=method)
117118

119+
def time_corrwith_cols(self, method, use_bottleneck):
120+
self.df.corrwith(self.df2, method=method)
121+
122+
def time_corrwith_rows(self, method, use_bottleneck):
123+
self.df.corrwith(self.df2, axis=1, method=method)
124+
118125

119126
class Covariance(object):
120127

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
ci/incremental/install_miniconda.sh
4444
ci/incremental/setup_conda_environment.sh
4545
displayName: 'Set up environment'
46+
condition: true
4647
4748
# Do not require pandas
4849
- script: |

ci/azure/posix.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,36 @@ jobs:
2020
CONDA_PY: "27"
2121
PATTERN: "not slow and not network"
2222

23-
py37_locale:
24-
ENV_FILE: ci/deps/azure-37-locale.yaml
25-
CONDA_PY: "37"
26-
PATTERN: "not slow and not network"
23+
py27_locale_slow_old_np:
24+
ENV_FILE: ci/deps/azure-27-locale.yaml
25+
CONDA_PY: "27"
26+
PATTERN: "slow"
2727
LOCALE_OVERRIDE: "zh_CN.UTF-8"
28+
EXTRA_APT: "language-pack-zh-hans"
2829

2930
py36_locale_slow:
3031
ENV_FILE: ci/deps/azure-36-locale_slow.yaml
3132
CONDA_PY: "36"
3233
PATTERN: "not slow and not network"
3334
LOCALE_OVERRIDE: "it_IT.UTF-8"
3435

36+
py37_locale:
37+
ENV_FILE: ci/deps/azure-37-locale.yaml
38+
CONDA_PY: "37"
39+
PATTERN: "not slow and not network"
40+
LOCALE_OVERRIDE: "zh_CN.UTF-8"
41+
42+
py37_np_dev:
43+
ENV_FILE: ci/deps/azure-37-numpydev.yaml
44+
CONDA_PY: "37"
45+
PATTERN: "not slow and not network"
46+
TEST_ARGS: "-W error"
47+
PANDAS_TESTING_MODE: "deprecate"
48+
EXTRA_APT: "xsel"
49+
3550
steps:
3651
- script: |
37-
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386; fi
52+
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386 $EXTRA_APT; fi
3853
echo "Installing Miniconda"
3954
ci/incremental/install_miniconda.sh
4055
export PATH=$HOME/miniconda3/bin:$PATH

0 commit comments

Comments
 (0)