Skip to content

Commit a10d09f

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into over
2 parents f531dfb + 9bc42f9 commit a10d09f

File tree

271 files changed

+7365
-6085
lines changed

Some content is hidden

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

271 files changed

+7365
-6085
lines changed

LICENSES/MUSL_LICENSE

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
musl as a whole is licensed under the following standard MIT license:
2+
3+
----------------------------------------------------------------------
4+
Copyright © 2005-2014 Rich Felker, et al.
5+
6+
Permission is hereby granted, free of charge, to any person obtaining
7+
a copy of this software and associated documentation files (the
8+
"Software"), to deal in the Software without restriction, including
9+
without limitation the rights to use, copy, modify, merge, publish,
10+
distribute, sublicense, and/or sell copies of the Software, and to
11+
permit persons to whom the Software is furnished to do so, subject to
12+
the following conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24+
----------------------------------------------------------------------
25+
26+
Authors/contributors include:
27+
28+
Anthony G. Basile
29+
Arvid Picciani
30+
Bobby Bingham
31+
Boris Brezillon
32+
Brent Cook
33+
Chris Spiegel
34+
Clément Vasseur
35+
Emil Renner Berthing
36+
Hiltjo Posthuma
37+
Isaac Dunham
38+
Jens Gustedt
39+
Jeremy Huntwork
40+
John Spencer
41+
Justin Cormack
42+
Luca Barbato
43+
Luka Perkov
44+
M Farkas-Dyck (Strake)
45+
Michael Forney
46+
Nicholas J. Kain
47+
orc
48+
Pascal Cuoq
49+
Pierre Carrier
50+
Rich Felker
51+
Richard Pennington
52+
sin
53+
Solar Designer
54+
Stefan Kristiansson
55+
Szabolcs Nagy
56+
Timo Teräs
57+
Valentin Ochs
58+
William Haddon
59+
60+
Portions of this software are derived from third-party works licensed
61+
under terms compatible with the above MIT license:
62+
63+
The TRE regular expression implementation (src/regex/reg* and
64+
src/regex/tre*) is Copyright © 2001-2008 Ville Laurikari and licensed
65+
under a 2-clause BSD license (license text in the source files). The
66+
included version has been heavily modified by Rich Felker in 2012, in
67+
the interests of size, simplicity, and namespace cleanliness.
68+
69+
Much of the math library code (src/math/* and src/complex/*) is
70+
Copyright © 1993,2004 Sun Microsystems or
71+
Copyright © 2003-2011 David Schultz or
72+
Copyright © 2003-2009 Steven G. Kargl or
73+
Copyright © 2003-2009 Bruce D. Evans or
74+
Copyright © 2008 Stephen L. Moshier
75+
and labelled as such in comments in the individual source files. All
76+
have been licensed under extremely permissive terms.
77+
78+
The ARM memcpy code (src/string/armel/memcpy.s) is Copyright © 2008
79+
The Android Open Source Project and is licensed under a two-clause BSD
80+
license. It was taken from Bionic libc, used on Android.
81+
82+
The implementation of DES for crypt (src/misc/crypt_des.c) is
83+
Copyright © 1994 David Burren. It is licensed under a BSD license.
84+
85+
The implementation of blowfish crypt (src/misc/crypt_blowfish.c) was
86+
originally written by Solar Designer and placed into the public
87+
domain. The code also comes with a fallback permissive license for use
88+
in jurisdictions that may not recognize the public domain.
89+
90+
The smoothsort implementation (src/stdlib/qsort.c) is Copyright © 2011
91+
Valentin Ochs and is licensed under an MIT-style license.
92+
93+
The BSD PRNG implementation (src/prng/random.c) and XSI search API
94+
(src/search/*.c) functions are Copyright © 2011 Szabolcs Nagy and
95+
licensed under following terms: "Permission to use, copy, modify,
96+
and/or distribute this code for any purpose with or without fee is
97+
hereby granted. There is no warranty."
98+
99+
The x86_64 port was written by Nicholas J. Kain. Several files (crt)
100+
were released into the public domain; others are licensed under the
101+
standard MIT license terms at the top of this file. See individual
102+
files for their copyright status.
103+
104+
The mips and microblaze ports were originally written by Richard
105+
Pennington for use in the ellcc project. The original code was adapted
106+
by Rich Felker for build system and code conventions during upstream
107+
integration. It is licensed under the standard MIT terms.
108+
109+
The powerpc port was also originally written by Richard Pennington,
110+
and later supplemented and integrated by John Spencer. It is licensed
111+
under the standard MIT terms.
112+
113+
All other files which have no copyright comments are original works
114+
produced specifically for use as part of this library, written either
115+
by Rich Felker, the main author of the library, or by one or more
116+
contibutors listed above. Details on authorship of individual files
117+
can be found in the git version control history of the project. The
118+
omission of copyright and license comments in each file is in the
119+
interest of source tree size.
120+
121+
All public header files (include/* and arch/*/bits/*) should be
122+
treated as Public Domain as they intentionally contain no content
123+
which can be covered by copyright. Some source modules may fall in
124+
this category as well. If you believe that a file is so trivial that
125+
it should be in the Public Domain, please contact the authors and
126+
request an explicit statement releasing it from copyright.
127+
128+
The following files are trivial, believed not to be copyrightable in
129+
the first place, and hereby explicitly released to the Public Domain:
130+
131+
All public headers: include/*, arch/*/bits/*
132+
Startup files: crt/*

asv_bench/benchmarks/algorithms.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
import warnings
21
from importlib import import_module
32

43
import numpy as np
4+
55
import pandas as pd
66
from pandas.util import testing as tm
77

8+
89
for imp in ['pandas.util', 'pandas.tools.hashing']:
910
try:
1011
hashing = import_module(imp)
@@ -73,10 +74,6 @@ def setup(self):
7374
self.uniques = tm.makeStringIndex(1000).values
7475
self.all = self.uniques.repeat(10)
7576

76-
def time_match_string(self):
77-
with warnings.catch_warnings(record=True):
78-
pd.match(self.all, self.uniques)
79-
8077

8178
class Hashing(object):
8279

asv_bench/benchmarks/frame_methods.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import string
2-
import warnings
32

43
import numpy as np
4+
5+
from pandas import (
6+
DataFrame, MultiIndex, NaT, Series, date_range, isnull, period_range)
57
import pandas.util.testing as tm
6-
from pandas import (DataFrame, Series, MultiIndex, date_range, period_range,
7-
isnull, NaT)
88

99

1010
class GetNumericData(object):
@@ -61,9 +61,6 @@ def time_reindex_axis1(self):
6161
def time_reindex_both_axes(self):
6262
self.df.reindex(index=self.idx, columns=self.idx)
6363

64-
def time_reindex_both_axes_ix(self):
65-
self.df.ix[self.idx, self.idx]
66-
6764
def time_reindex_upcast(self):
6865
self.df2.reindex(np.random.permutation(range(1200)))
6966

asv_bench/benchmarks/groupby.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import warnings
2-
from string import ascii_letters
3-
from itertools import product
41
from functools import partial
2+
from itertools import product
3+
from string import ascii_letters
4+
import warnings
55

66
import numpy as np
7-
from pandas import (DataFrame, Series, MultiIndex, date_range, period_range,
8-
TimeGrouper, Categorical, Timestamp)
7+
8+
from pandas import (
9+
Categorical, DataFrame, MultiIndex, Series, TimeGrouper, Timestamp,
10+
date_range, period_range)
911
import pandas.util.testing as tm
1012

1113

@@ -210,7 +212,7 @@ def time_multi_int_nunique(self, df):
210212

211213
class AggFunctions(object):
212214

213-
def setup_cache():
215+
def setup_cache(self):
214216
N = 10**5
215217
fac1 = np.array(['A', 'B', 'C'], dtype='O')
216218
fac2 = np.array(['one', 'two'], dtype='O')
@@ -471,8 +473,8 @@ def setup(self):
471473
n1 = 400
472474
n2 = 250
473475
index = MultiIndex(levels=[np.arange(n1), tm.makeStringIndex(n2)],
474-
labels=[np.repeat(range(n1), n2).tolist(),
475-
list(range(n2)) * n1],
476+
codes=[np.repeat(range(n1), n2).tolist(),
477+
list(range(n2)) * n1],
476478
names=['lev1', 'lev2'])
477479
arr = np.random.randn(n1 * n2, 3)
478480
arr[::10000, 0] = np.nan

asv_bench/benchmarks/join_merge.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,16 @@ class Join(object):
115115
def setup(self, sort):
116116
level1 = tm.makeStringIndex(10).values
117117
level2 = tm.makeStringIndex(1000).values
118-
label1 = np.arange(10).repeat(1000)
119-
label2 = np.tile(np.arange(1000), 10)
118+
codes1 = np.arange(10).repeat(1000)
119+
codes2 = np.tile(np.arange(1000), 10)
120120
index2 = MultiIndex(levels=[level1, level2],
121-
labels=[label1, label2])
121+
codes=[codes1, codes2])
122122
self.df_multi = DataFrame(np.random.randn(len(index2), 4),
123123
index=index2,
124124
columns=['A', 'B', 'C', 'D'])
125125

126-
self.key1 = np.tile(level1.take(label1), 10)
127-
self.key2 = np.tile(level2.take(label2), 10)
126+
self.key1 = np.tile(level1.take(codes1), 10)
127+
self.key2 = np.tile(level2.take(codes2), 10)
128128
self.df = DataFrame({'data1': np.random.randn(100000),
129129
'data2': np.random.randn(100000),
130130
'key1': self.key1,

asv_bench/benchmarks/multiindex_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def setup(self):
7979
levels = [np.arange(n),
8080
tm.makeStringIndex(n).values,
8181
1000 + np.arange(n)]
82-
labels = [np.random.choice(n, (k * n)) for lev in levels]
83-
self.mi = MultiIndex(levels=levels, labels=labels)
82+
codes = [np.random.choice(n, (k * n)) for lev in levels]
83+
self.mi = MultiIndex(levels=levels, codes=codes)
8484

8585
def time_duplicated(self):
8686
self.mi.duplicated()

asv_bench/benchmarks/period.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@ class PeriodIndexConstructor(object):
4343
def setup(self, freq):
4444
self.rng = date_range('1985', periods=1000)
4545
self.rng2 = date_range('1985', periods=1000).to_pydatetime()
46+
self.ints = list(range(2000, 3000))
4647

4748
def time_from_date_range(self, freq):
4849
PeriodIndex(self.rng, freq=freq)
4950

5051
def time_from_pydatetime(self, freq):
5152
PeriodIndex(self.rng2, freq=freq)
5253

54+
def time_from_ints(self, freq):
55+
PeriodIndex(self.ints, freq=freq)
56+
5357

5458
class DataFramePeriodColumn(object):
5559

asv_bench/benchmarks/reindex.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ class LevelAlign(object):
7171
def setup(self):
7272
self.index = MultiIndex(
7373
levels=[np.arange(10), np.arange(100), np.arange(100)],
74-
labels=[np.arange(10).repeat(10000),
75-
np.tile(np.arange(100).repeat(100), 10),
76-
np.tile(np.tile(np.arange(100), 100), 10)])
74+
codes=[np.arange(10).repeat(10000),
75+
np.tile(np.arange(100).repeat(100), 10),
76+
np.tile(np.tile(np.arange(100), 100), 10)])
7777
self.df = DataFrame(np.random.randn(len(self.index), 4),
7878
index=self.index)
7979
self.df_level = DataFrame(np.random.randn(100, 4),

asv_bench/benchmarks/stat_ops.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ class FrameMultiIndexOps(object):
3131

3232
def setup(self, level, op):
3333
levels = [np.arange(10), np.arange(100), np.arange(100)]
34-
labels = [np.arange(10).repeat(10000),
35-
np.tile(np.arange(100).repeat(100), 10),
36-
np.tile(np.tile(np.arange(100), 100), 10)]
37-
index = pd.MultiIndex(levels=levels, labels=labels)
34+
codes = [np.arange(10).repeat(10000),
35+
np.tile(np.arange(100).repeat(100), 10),
36+
np.tile(np.tile(np.arange(100), 100), 10)]
37+
index = pd.MultiIndex(levels=levels, codes=codes)
3838
df = pd.DataFrame(np.random.randn(len(index), 4), index=index)
3939
self.df_func = getattr(df, op)
4040

@@ -67,10 +67,10 @@ class SeriesMultiIndexOps(object):
6767

6868
def setup(self, level, op):
6969
levels = [np.arange(10), np.arange(100), np.arange(100)]
70-
labels = [np.arange(10).repeat(10000),
71-
np.tile(np.arange(100).repeat(100), 10),
72-
np.tile(np.tile(np.arange(100), 100), 10)]
73-
index = pd.MultiIndex(levels=levels, labels=labels)
70+
codes = [np.arange(10).repeat(10000),
71+
np.tile(np.arange(100).repeat(100), 10),
72+
np.tile(np.tile(np.arange(100), 100), 10)]
73+
index = pd.MultiIndex(levels=levels, codes=codes)
7474
s = pd.Series(np.random.randn(len(index)), index=index)
7575
self.s_func = getattr(s, op)
7676

azure-pipelines.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
11
# Adapted from https://github.com/numba/numba/blob/master/azure-pipelines.yml
22
jobs:
3-
# Mac and Linux could potentially use the same template
4-
# except it isn't clear how to use a different build matrix
5-
# for each, so for now they are separate
6-
- template: ci/azure/macos.yml
3+
# Mac and Linux use the same template
4+
- template: ci/azure/posix.yml
75
parameters:
86
name: macOS
97
vmImage: xcode9-macos10.13
10-
- template: ci/azure/linux.yml
8+
- template: ci/azure/posix.yml
119
parameters:
1210
name: Linux
1311
vmImage: ubuntu-16.04
1412

15-
# Windows Python 2.7 needs VC 9.0 installed, and not sure
16-
# how to make that a conditional task, so for now these are
17-
# separate templates as well
13+
# Windows Python 2.7 needs VC 9.0 installed, handled in the template
1814
- template: ci/azure/windows.yml
1915
parameters:
2016
name: Windows
2117
vmImage: vs2017-win2016
22-
- template: ci/azure/windows-py27.yml
23-
parameters:
24-
name: WindowsPy27
25-
vmImage: vs2017-win2016
2618

2719
- job: 'Checks_and_doc'
2820
pool:

0 commit comments

Comments
 (0)