Skip to content

Commit 5eeb7d9

Browse files
author
Christopher C. Aycock
committed
Merge master into GH13936
2 parents c33c4cb + 14e4815 commit 5eeb7d9

File tree

106 files changed

+4049
-8640
lines changed

Some content is hidden

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

106 files changed

+4049
-8640
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
global:
1717

1818
# pandas-docs-travis GH
19-
- secure: "PCzUFR8CHmw9lH84p4ygnojdF7Z8U5h7YfY0RyT+5K/aiQ1ZTU3ZkDTPI0/rR5FVMxsEEKEQKMcc5fvqW0PeD7Q2wRmluloKgT9w4EVEJ1ppKf7lITPcvZR2QgVOvjv4AfDtibLHFNiaSjzoqyJVjM4igjOu8WTlF3JfZcmOQjQ="
19+
- secure: "YvvTc+FrSYHgdxqoxn9s8VOaCWjvZzlkaf6k55kkmQqCYR9dPiLMsot1F96/N7o3YlD1s0znPQCak93Du8HHi/8809zAXloTaMSZrWz4R4qn96xlZFRE88O/w/Z1t3VVYpKX3MHlCggBc8MtXrqmvWKJMAqXyysZ4TTzoiJDPvE="
2020

2121
git:
2222
# for cloning

asv_bench/benchmarks/algorithms.py

+14-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pandas.util import testing as tm
44

55

6-
class algorithm(object):
6+
class Algorithms(object):
77
goal_time = 0.2
88

99
def setup(self):
@@ -24,21 +24,28 @@ def setup(self):
2424
self.arrneg = np.arange(-1000000, 0)
2525
self.arrmixed = np.array([1, -1]).repeat(500000)
2626

27-
def time_int_factorize(self):
27+
# match
28+
self.uniques = tm.makeStringIndex(1000).values
29+
self.all = self.uniques.repeat(10)
30+
31+
def time_factorize_int(self):
2832
self.int.factorize()
2933

30-
def time_float_factorize(self):
34+
def time_factorize_float(self):
3135
self.int.factorize()
3236

33-
def time_int_unique_duplicated(self):
37+
def time_duplicated_int_unique(self):
3438
self.int_unique.duplicated()
3539

36-
def time_int_duplicated(self):
40+
def time_duplicated_int(self):
3741
self.int.duplicated()
3842

39-
def time_float_duplicated(self):
43+
def time_duplicated_float(self):
4044
self.float.duplicated()
4145

46+
def time_match_strings(self):
47+
pd.match(self.all, self.uniques)
48+
4249
def time_add_overflow_pos_scalar(self):
4350
self.checked_add(self.arr, 1)
4451

@@ -58,7 +65,7 @@ def time_add_overflow_mixed_arr(self):
5865
self.checked_add(self.arr, self.arrmixed)
5966

6067

61-
class hashing(object):
68+
class Hashing(object):
6269
goal_time = 0.2
6370

6471
def setup(self):

asv_bench/benchmarks/attrs_caching.py

+16-7
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
from .pandas_vb_common import *
2+
from pandas.util.decorators import cache_readonly
23

34

4-
class getattr_dataframe_index(object):
5+
class DataFrameAttributes(object):
56
goal_time = 0.2
67

78
def setup(self):
89
self.df = DataFrame(np.random.randn(10, 6))
910
self.cur_index = self.df.index
1011

11-
def time_getattr_dataframe_index(self):
12+
def time_get_index(self):
1213
self.foo = self.df.index
1314

15+
def time_set_index(self):
16+
self.df.index = self.cur_index
17+
1418

15-
class setattr_dataframe_index(object):
19+
class CacheReadonly(object):
1620
goal_time = 0.2
1721

1822
def setup(self):
19-
self.df = DataFrame(np.random.randn(10, 6))
20-
self.cur_index = self.df.index
2123

22-
def time_setattr_dataframe_index(self):
23-
self.df.index = self.cur_index
24+
class Foo:
25+
26+
@cache_readonly
27+
def prop(self):
28+
return 5
29+
self.obj = Foo()
30+
31+
def time_cache_readonly(self):
32+
self.obj.prop

0 commit comments

Comments
 (0)