Skip to content

Commit 27df317

Browse files
committed
Merge remote-tracking branch 'upstream/master' into segfault_memory_usage
2 parents 7fdd03e + 78ba063 commit 27df317

File tree

109 files changed

+2766
-3282
lines changed

Some content is hidden

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

109 files changed

+2766
-3282
lines changed

asv_bench/benchmarks/replace.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ class Convert(object):
4444

4545
goal_time = 0.5
4646
params = (['DataFrame', 'Series'], ['Timestamp', 'Timedelta'])
47-
param_names = ['contructor', 'replace_data']
47+
param_names = ['constructor', 'replace_data']
4848

49-
def setup(self, contructor, replace_data):
49+
def setup(self, constructor, replace_data):
5050
N = 10**3
5151
data = {'Series': pd.Series(np.random.randint(N, size=N)),
5252
'DataFrame': pd.DataFrame({'A': np.random.randint(N, size=N),
5353
'B': np.random.randint(N, size=N)})}
5454
self.to_replace = {i: getattr(pd, replace_data) for i in range(N)}
55-
self.data = data[contructor]
55+
self.data = data[constructor]
5656

57-
def time_replace(self, contructor, replace_data):
57+
def time_replace(self, constructor, replace_data):
5858
self.data.replace(self.to_replace)

asv_bench/benchmarks/rolling.py

+29-8
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,52 @@ class Methods(object):
1111
[10, 1000],
1212
['int', 'float'],
1313
['median', 'mean', 'max', 'min', 'std', 'count', 'skew', 'kurt',
14-
'sum', 'corr', 'cov'])
14+
'sum'])
1515
param_names = ['contructor', 'window', 'dtype', 'method']
1616

17-
def setup(self, contructor, window, dtype, method):
17+
def setup(self, constructor, window, dtype, method):
1818
N = 10**5
1919
arr = np.random.random(N).astype(dtype)
20-
self.roll = getattr(pd, contructor)(arr).rolling(window)
20+
self.roll = getattr(pd, constructor)(arr).rolling(window)
2121

22-
def time_rolling(self, contructor, window, dtype, method):
22+
def time_rolling(self, constructor, window, dtype, method):
2323
getattr(self.roll, method)()
2424

2525

26+
class Pairwise(object):
27+
28+
sample_time = 0.2
29+
params = ([10, 1000, None],
30+
['corr', 'cov'],
31+
[True, False])
32+
param_names = ['window', 'method', 'pairwise']
33+
34+
def setup(self, window, method, pairwise):
35+
N = 10**4
36+
arr = np.random.random(N)
37+
self.df = pd.DataFrame(arr)
38+
39+
def time_pairwise(self, window, method, pairwise):
40+
if window is None:
41+
r = self.df.expanding()
42+
else:
43+
r = self.df.rolling(window=window)
44+
getattr(r, method)(self.df, pairwise=pairwise)
45+
46+
2647
class Quantile(object):
2748

2849
sample_time = 0.2
2950
params = (['DataFrame', 'Series'],
3051
[10, 1000],
3152
['int', 'float'],
3253
[0, 0.5, 1])
33-
param_names = ['contructor', 'window', 'dtype', 'percentile']
54+
param_names = ['constructor', 'window', 'dtype', 'percentile']
3455

35-
def setup(self, contructor, window, dtype, percentile):
56+
def setup(self, constructor, window, dtype, percentile):
3657
N = 10**5
3758
arr = np.random.random(N).astype(dtype)
38-
self.roll = getattr(pd, contructor)(arr).rolling(window)
59+
self.roll = getattr(pd, constructor)(arr).rolling(window)
3960

40-
def time_quantile(self, contructor, window, dtype, percentile):
61+
def time_quantile(self, constructor, window, dtype, percentile):
4162
self.roll.quantile(percentile)

ci/requirements-3.6.run

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ lxml
1313
html5lib
1414
jinja2
1515
sqlalchemy
16-
pymysql
16+
pymysql<0.8.0
1717
feather-format
1818
pyarrow
1919
psycopg2

doc/source/10min.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Selection
154154
While standard Python / Numpy expressions for selecting and setting are
155155
intuitive and come in handy for interactive work, for production code, we
156156
recommend the optimized pandas data access methods, ``.at``, ``.iat``,
157-
``.loc``, ``.iloc`` and ``.ix``.
157+
``.loc`` and ``.iloc``.
158158

159159
See the indexing documentation :ref:`Indexing and Selecting Data <indexing>` and :ref:`MultiIndex / Advanced Indexing <advanced>`.
160160

doc/source/api.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2500,7 +2500,7 @@ Scalar introspection
25002500
Extensions
25012501
----------
25022502

2503-
These are primarily intented for library authors looking to extend pandas
2503+
These are primarily intended for library authors looking to extend pandas
25042504
objects.
25052505

25062506
.. currentmodule:: pandas

0 commit comments

Comments
 (0)