diff --git a/asv_bench/benchmarks/indexing.py b/asv_bench/benchmarks/indexing.py index 57ba9cd80e55c..b8e983c60b8b5 100644 --- a/asv_bench/benchmarks/indexing.py +++ b/asv_bench/benchmarks/indexing.py @@ -2,7 +2,7 @@ import numpy as np import pandas.util.testing as tm -from pandas import (Series, DataFrame, Panel, MultiIndex, +from pandas import (Series, DataFrame, MultiIndex, Int64Index, UInt64Index, Float64Index, IntervalIndex, CategoricalIndex, IndexSlice, concat, date_range) @@ -277,18 +277,6 @@ def time_get_indexer_list(self, index): self.data.get_indexer(self.cat_list) -class PanelIndexing(object): - - def setup(self): - with warnings.catch_warnings(record=True): - self.p = Panel(np.random.randn(100, 100, 100)) - self.inds = range(0, 100, 10) - - def time_subset(self): - with warnings.catch_warnings(record=True): - self.p.ix[(self.inds, self.inds, self.inds)] - - class MethodLookup(object): def setup_cache(self): diff --git a/asv_bench/benchmarks/join_merge.py b/asv_bench/benchmarks/join_merge.py index 6da8287a06d80..baad8b61bfd19 100644 --- a/asv_bench/benchmarks/join_merge.py +++ b/asv_bench/benchmarks/join_merge.py @@ -1,9 +1,8 @@ -import warnings import string import numpy as np import pandas.util.testing as tm -from pandas import (DataFrame, Series, Panel, MultiIndex, +from pandas import (DataFrame, Series, MultiIndex, date_range, concat, merge, merge_asof) try: @@ -66,31 +65,6 @@ def time_concat_mixed_ndims(self, axis): concat(self.mixed_ndims, axis=axis) -class ConcatPanels(object): - - params = ([0, 1, 2], [True, False]) - param_names = ['axis', 'ignore_index'] - - def setup(self, axis, ignore_index): - with warnings.catch_warnings(record=True): - panel_c = Panel(np.zeros((10000, 200, 2), - dtype=np.float32, - order='C')) - self.panels_c = [panel_c] * 20 - panel_f = Panel(np.zeros((10000, 200, 2), - dtype=np.float32, - order='F')) - self.panels_f = [panel_f] * 20 - - def time_c_ordered(self, axis, ignore_index): - with warnings.catch_warnings(record=True): - concat(self.panels_c, axis=axis, ignore_index=ignore_index) - - def time_f_ordered(self, axis, ignore_index): - with warnings.catch_warnings(record=True): - concat(self.panels_f, axis=axis, ignore_index=ignore_index) - - class ConcatDataFrames(object): params = ([0, 1], [True, False]) diff --git a/asv_bench/benchmarks/panel_ctor.py b/asv_bench/benchmarks/panel_ctor.py deleted file mode 100644 index 627705284481b..0000000000000 --- a/asv_bench/benchmarks/panel_ctor.py +++ /dev/null @@ -1,55 +0,0 @@ -import warnings -from datetime import datetime, timedelta - -from pandas import DataFrame, Panel, date_range - - -class DifferentIndexes(object): - def setup(self): - self.data_frames = {} - start = datetime(1990, 1, 1) - end = datetime(2012, 1, 1) - for x in range(100): - end += timedelta(days=1) - idx = date_range(start, end) - df = DataFrame({'a': 0, 'b': 1, 'c': 2}, index=idx) - self.data_frames[x] = df - - def time_from_dict(self): - with warnings.catch_warnings(record=True): - Panel.from_dict(self.data_frames) - - -class SameIndexes(object): - - def setup(self): - idx = date_range(start=datetime(1990, 1, 1), - end=datetime(2012, 1, 1), - freq='D') - df = DataFrame({'a': 0, 'b': 1, 'c': 2}, index=idx) - self.data_frames = dict(enumerate([df] * 100)) - - def time_from_dict(self): - with warnings.catch_warnings(record=True): - Panel.from_dict(self.data_frames) - - -class TwoIndexes(object): - - def setup(self): - start = datetime(1990, 1, 1) - end = datetime(2012, 1, 1) - df1 = DataFrame({'a': 0, 'b': 1, 'c': 2}, - index=date_range(start=start, end=end, freq='D')) - end += timedelta(days=1) - df2 = DataFrame({'a': 0, 'b': 1, 'c': 2}, - index=date_range(start=start, end=end, freq='D')) - dfs = [df1] * 50 + [df2] * 50 - self.data_frames = dict(enumerate(dfs)) - - def time_from_dict(self): - with warnings.catch_warnings(record=True): - Panel.from_dict(self.data_frames) - - -from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/panel_methods.py b/asv_bench/benchmarks/panel_methods.py deleted file mode 100644 index a4c12c082236e..0000000000000 --- a/asv_bench/benchmarks/panel_methods.py +++ /dev/null @@ -1,25 +0,0 @@ -import warnings - -import numpy as np -from pandas import Panel - - -class PanelMethods(object): - - params = ['items', 'major', 'minor'] - param_names = ['axis'] - - def setup(self, axis): - with warnings.catch_warnings(record=True): - self.panel = Panel(np.random.randn(100, 1000, 100)) - - def time_pct_change(self, axis): - with warnings.catch_warnings(record=True): - self.panel.pct_change(1, axis=axis) - - def time_shift(self, axis): - with warnings.catch_warnings(record=True): - self.panel.shift(1, axis=axis) - - -from .pandas_vb_common import setup # noqa: F401