mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Add benchmark from ARROW-4629
This commit is contained in:
1 parent
f7bf77414d
commit
4d94b2e173
1 file changed
+14
@@ -105,3 +105,17 @@ class SerializeDeserializePandas(object):
|
||||
|
||||
def time_deserialize_pandas(self):
|
||||
pa.deserialize_pandas(self.serialized)
|
||||
|
||||
|
||||
class TableFromPandasMicroperformance(object):
|
||||
# ARROW-4629
|
||||
|
||||
def setup(self):
|
||||
ser = pd.Series(range(10000))
|
||||
df = pd.DataFrame({col: ser.copy(deep=True) for col in range(100)})
|
||||
# Simulate a real dataset by converting some columns to strings
|
||||
self.df = df.astype({col: str for col in range(50)})
|
||||
|
||||
def time_Table_from_pandas(self):
|
||||
for _ in range(50):
|
||||
pa.Table.from_pandas(self.df, nthreads=1)
|
||||
Reference in new issue
Block a user