diff --git a/docs/source/python/benchmarks.rst b/docs/source/python/benchmarks.rst index aee83b7784e39..68fc03c7bcfbc 100644 --- a/docs/source/python/benchmarks.rst +++ b/docs/source/python/benchmarks.rst @@ -27,8 +27,7 @@ run with `ASV`_. You'll need to install the ``asv`` package first Running the benchmarks ---------------------- -To run the benchmarks for a locally-built Arrow, run ``asv dev`` or -``asv run --python=same``. +To run the benchmarks for a locally-built Arrow, run ``asv run --python=same``. We use conda environments as part of running the benchmarks. To use the ``asv`` setup, you must set the ``$CONDA_HOME`` environment variable to point to the diff --git a/python/benchmarks/common.py b/python/benchmarks/common.py index 48526a4054e96..8317ff3171bb9 100644 --- a/python/benchmarks/common.py +++ b/python/benchmarks/common.py @@ -26,7 +26,6 @@ import pyarrow as pa - KILOBYTE = 1 << 10 MEGABYTE = KILOBYTE * KILOBYTE diff --git a/python/benchmarks/convert_pandas.py b/python/benchmarks/convert_pandas.py index 184fd4a66b1dc..378c17c8b8f59 100644 --- a/python/benchmarks/convert_pandas.py +++ b/python/benchmarks/convert_pandas.py @@ -17,9 +17,9 @@ import numpy as np import pandas as pd -import pandas.util.testing as tm import pyarrow as pa +from pyarrow.tests.util import rands class PandasConversionsBase(object): @@ -60,7 +60,7 @@ class ToPandasStrings(object): def setup(self, uniqueness, total): nunique = int(total * uniqueness) - unique_values = [tm.rands(self.string_length) for i in range(nunique)] + unique_values = [rands(self.string_length) for i in range(nunique)] values = unique_values * (total // nunique) self.arr = pa.array(values, type=pa.string()) self.table = pa.Table.from_arrays([self.arr], ['f0']) diff --git a/python/benchmarks/parquet.py b/python/benchmarks/parquet.py index ca39919b4b9b7..1ad2602752799 100644 --- a/python/benchmarks/parquet.py +++ b/python/benchmarks/parquet.py @@ -15,7 +15,6 @@ # specific language governing permissions and limitations # under the License. -from pandas.util.testing import rands import numpy as np import pyarrow as pa @@ -23,6 +22,7 @@ import pyarrow.parquet as pq except ImportError: pq = None +from pyarrow.tests.util import rands class ParquetWriteBinary(object):