Skip to content

Commit 17d6858

Browse files
fix hashing benchmarks
1 parent 5cf663e commit 17d6858

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

asv_bench/benchmarks/algorithms.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
import pandas as pd
33
from pandas.util import testing as tm
44

5+
try:
6+
from pandas.tools.hashing import hash_pandas_object
7+
except ImportError:
8+
pass
9+
510

611
class Algorithms(object):
712
goal_time = 0.2
@@ -103,13 +108,13 @@ def setup(self):
103108
self.df.iloc[10:20] = np.nan
104109

105110
def time_frame(self):
106-
self.df.hash()
111+
hash_pandas_object(self.df)
107112

108113
def time_series_int(self):
109-
self.df.E.hash()
114+
hash_pandas_object(self.df.E)
110115

111116
def time_series_string(self):
112-
self.df.B.hash()
117+
hash_pandas_object(self.df.B)
113118

114119
def time_series_categorical(self):
115-
self.df.C.hash()
120+
hash_pandas_object(self.df.C)

0 commit comments

Comments
 (0)