Skip to content

Commit e796e8b

Browse files
committed
Merge remote-tracking branch 'origin/master' into bf-cython
* origin/master: (22 commits) BUG: astype falsely converts inf to integer (GH14265) (pandas-dev#14343) BUG: Apply min_itemsize to index even when not appending DOC: warning section on memory overflow when joining/merging dataframes on index with duplicate keys (pandas-dev#14788) BLD: missing - on secure BLD: new access token on pandas-dev TST: Test DatetimeIndex weekend offset (pandas-dev#14853) BLD: escape GH_TOKEN in build_docs TST: Correct results with np.size and crosstab (pandas-dev#4003) (pandas-dev#14755) Frame benchmarking sum instead of mean (pandas-dev#14824) CLN: lint of test_base.py BUG: Allow TZ-aware DatetimeIndex in merge_asof() (pandas-dev#14844) BUG: GH11847 Unstack with mixed dtypes coerces everything to object TST: skip testing on windows for specific formatting which sometimes hangs (pandas-dev#14851) BLD: try new gh token for pandas-docs CLN/PERF: clean-up of the benchmarks (pandas-dev#14099) ENH: add timedelta as valid type for interpolate with method='time' (pandas-dev#14799) DOC: add section on groupby().rolling/expanding/resample (pandas-dev#14801) TST: add test to confirm GH14606 (specify category dtype for empty) (pandas-dev#14752) BLD: use org name in build-docs.sh BF(TST): use = (native) instead of < (little endian) for target data types (pandas-dev#14832) ...
2 parents 7ce8036 + 0c82abe commit e796e8b

Some content is hidden

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

63 files changed

+2363
-7193
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: "UJK7kUtkcnV9PFP4IBXAvgmRQKdwARlfqF4UZQ5tBwrpnD1a3n7FLBijcuXQ3jkvwpEc/FZB9RJDXmsqYXJPvq3BC++2Cv2tFDvKr/c+y8KffszAyVk47jKEHMNmGgauwaNMggsE/rH8YHe4so9LsJHTRbzmLo8lXPNTldoIu5s="
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)