diff --git a/asv_bench/benchmarks/algorithms.py b/asv_bench/benchmarks/algorithms.py index fc34440ece2ed..baac179355022 100644 --- a/asv_bench/benchmarks/algorithms.py +++ b/asv_bench/benchmarks/algorithms.py @@ -12,8 +12,6 @@ except (ImportError, TypeError, ValueError): pass -from .pandas_vb_common import setup # noqa - class Factorize(object): @@ -126,3 +124,6 @@ def time_series_timedeltas(self, df): def time_series_dates(self, df): hashing.hash_pandas_object(df['dates']) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/attrs_caching.py b/asv_bench/benchmarks/attrs_caching.py index 48f0b7d71144c..7fb9fd26ad8ba 100644 --- a/asv_bench/benchmarks/attrs_caching.py +++ b/asv_bench/benchmarks/attrs_caching.py @@ -5,8 +5,6 @@ except ImportError: from pandas.util.decorators import cache_readonly -from .pandas_vb_common import setup # noqa - class DataFrameAttributes(object): @@ -38,3 +36,6 @@ def prop(self): def time_cache_readonly(self): self.obj.prop + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/binary_ops.py b/asv_bench/benchmarks/binary_ops.py index cc8766e1fa39c..35787920dc789 100644 --- a/asv_bench/benchmarks/binary_ops.py +++ b/asv_bench/benchmarks/binary_ops.py @@ -6,8 +6,6 @@ except ImportError: import pandas.computation.expressions as expr -from .pandas_vb_common import setup # noqa - class Ops(object): @@ -149,3 +147,6 @@ def time_add_overflow_b_mask_nan(self): def time_add_overflow_both_arg_nan(self): checked_add_with_arr(self.arr, self.arr_mixed, arr_mask=self.arr_nan_1, b_mask=self.arr_nan_2) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/categoricals.py b/asv_bench/benchmarks/categoricals.py index 2a7717378c280..418e60eb6d6d3 100644 --- a/asv_bench/benchmarks/categoricals.py +++ b/asv_bench/benchmarks/categoricals.py @@ -11,8 +11,6 @@ except ImportError: pass -from .pandas_vb_common import setup # noqa - class Concat(object): @@ -245,3 +243,6 @@ def time_getitem_list(self, index): def time_getitem_bool_array(self, index): self.data[self.data == self.cat_scalar] + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/ctors.py b/asv_bench/benchmarks/ctors.py index 3f9016787aab4..94dbd05917455 100644 --- a/asv_bench/benchmarks/ctors.py +++ b/asv_bench/benchmarks/ctors.py @@ -2,8 +2,6 @@ import pandas.util.testing as tm from pandas import Series, Index, DatetimeIndex, Timestamp, MultiIndex -from .pandas_vb_common import setup # noqa - class SeriesConstructors(object): @@ -64,3 +62,6 @@ def setup(self): def time_multiindex_from_iterables(self): MultiIndex.from_product(self.iterables) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/eval.py b/asv_bench/benchmarks/eval.py index 8e581dcf22b4c..da2d7dc7c4492 100644 --- a/asv_bench/benchmarks/eval.py +++ b/asv_bench/benchmarks/eval.py @@ -5,8 +5,6 @@ except ImportError: import pandas.computation.expressions as expr -from .pandas_vb_common import setup # noqa - class Eval(object): @@ -65,3 +63,6 @@ def time_query_datetime_column(self): def time_query_with_boolean_selection(self): self.df.query('(a >= @self.min_val) & (a <= @self.max_val)') + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/frame_ctor.py b/asv_bench/benchmarks/frame_ctor.py index 9def910df0bab..d3f1a416a7cc1 100644 --- a/asv_bench/benchmarks/frame_ctor.py +++ b/asv_bench/benchmarks/frame_ctor.py @@ -7,8 +7,6 @@ # For compatibility with older versions from pandas.core.datetools import * # noqa -from .pandas_vb_common import setup # noqa - class FromDicts(object): @@ -99,3 +97,6 @@ def setup(self): def time_frame_from_ndarray(self): self.df = DataFrame(self.data) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/frame_methods.py b/asv_bench/benchmarks/frame_methods.py index f911d506b1f4f..89fd879746f68 100644 --- a/asv_bench/benchmarks/frame_methods.py +++ b/asv_bench/benchmarks/frame_methods.py @@ -6,8 +6,6 @@ from pandas import (DataFrame, Series, MultiIndex, date_range, period_range, isnull, NaT) -from .pandas_vb_common import setup # noqa - class GetNumericData(object): @@ -537,3 +535,6 @@ def time_series_describe(self): def time_dataframe_describe(self): self.df.describe() + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/gil.py b/asv_bench/benchmarks/gil.py index 21c1ccf46e1c4..32cb60be3f485 100644 --- a/asv_bench/benchmarks/gil.py +++ b/asv_bench/benchmarks/gil.py @@ -23,7 +23,7 @@ def wrapper(fname): return fname return wrapper -from .pandas_vb_common import BaseIO, setup # noqa +from .pandas_vb_common import BaseIO class ParallelGroupbyMethods(object): @@ -273,3 +273,6 @@ def time_parallel(self, threads): def time_loop(self, threads): for i in range(threads): self.loop() + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/groupby.py b/asv_bench/benchmarks/groupby.py index b51b41614bc49..be09bba97bea3 100644 --- a/asv_bench/benchmarks/groupby.py +++ b/asv_bench/benchmarks/groupby.py @@ -8,8 +8,6 @@ TimeGrouper, Categorical, Timestamp) import pandas.util.testing as tm -from .pandas_vb_common import setup # noqa - method_blacklist = { 'object': {'median', 'prod', 'sem', 'cumsum', 'sum', 'cummin', 'mean', @@ -579,3 +577,6 @@ def setup(self): def time_first(self): self.df_nans.groupby('key').transform('first') + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/index_object.py b/asv_bench/benchmarks/index_object.py index f1703e163917a..c1bc53823a342 100644 --- a/asv_bench/benchmarks/index_object.py +++ b/asv_bench/benchmarks/index_object.py @@ -3,8 +3,6 @@ from pandas import (Series, date_range, DatetimeIndex, Index, RangeIndex, Float64Index) -from .pandas_vb_common import setup # noqa - class SetOperations(object): @@ -192,3 +190,6 @@ def setup(self): def time_get_loc(self): self.ind.get_loc(0) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/indexing.py b/asv_bench/benchmarks/indexing.py index 2850fa249725c..e83efdd0fa2a0 100644 --- a/asv_bench/benchmarks/indexing.py +++ b/asv_bench/benchmarks/indexing.py @@ -2,10 +2,10 @@ import numpy as np import pandas.util.testing as tm -from pandas import (Series, DataFrame, MultiIndex, Panel, - Int64Index, Float64Index, IntervalIndex, - CategoricalIndex, IndexSlice, concat, date_range) -from .pandas_vb_common import setup # noqa +from pandas import (Series, DataFrame, MultiIndex, Int64Index, Float64Index, + IntervalIndex, CategoricalIndex, + IndexSlice, concat, date_range) +from .pandas_vb_common import Panel class NumericSeriesIndexing(object): @@ -367,3 +367,6 @@ def time_assign_with_setitem(self): np.random.seed(1234) for i in range(100): self.df[i] = np.random.randn(self.N) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/inference.py b/asv_bench/benchmarks/inference.py index 16d9e7cd73cbb..7fb57991c99bc 100644 --- a/asv_bench/benchmarks/inference.py +++ b/asv_bench/benchmarks/inference.py @@ -2,7 +2,7 @@ import pandas.util.testing as tm from pandas import DataFrame, Series, to_numeric -from .pandas_vb_common import numeric_dtypes, lib, setup # noqa +from .pandas_vb_common import numeric_dtypes, lib class NumericInferOps(object): @@ -111,3 +111,6 @@ def setup_cache(self): def time_convert(self, data): lib.maybe_convert_numeric(data, set(), coerce_numeric=False) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/csv.py b/asv_bench/benchmarks/io/csv.py index 12cb893462b87..ac2370fe85e5a 100644 --- a/asv_bench/benchmarks/io/csv.py +++ b/asv_bench/benchmarks/io/csv.py @@ -6,7 +6,7 @@ from pandas import DataFrame, Categorical, date_range, read_csv from pandas.compat import cStringIO as StringIO -from ..pandas_vb_common import setup, BaseIO # noqa +from ..pandas_vb_common import BaseIO class ToCSV(BaseIO): @@ -225,3 +225,6 @@ def time_baseline(self): read_csv(self.data(self.StringIO_input), sep=',', header=None, parse_dates=[1], names=list(string.digits[:9])) + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/excel.py b/asv_bench/benchmarks/io/excel.py index 58ab6bb8046c5..b873dc1040a66 100644 --- a/asv_bench/benchmarks/io/excel.py +++ b/asv_bench/benchmarks/io/excel.py @@ -3,7 +3,7 @@ from pandas.compat import BytesIO import pandas.util.testing as tm -from ..pandas_vb_common import BaseIO, setup # noqa +from ..pandas_vb_common import BaseIO class Excel(object): @@ -34,3 +34,6 @@ def time_write_excel(self, engine): writer_write = ExcelWriter(bio_write, engine=engine) self.df.to_excel(writer_write, sheet_name='Sheet1') writer_write.save() + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/hdf.py b/asv_bench/benchmarks/io/hdf.py index 4b6e1d69af92d..c150d82450770 100644 --- a/asv_bench/benchmarks/io/hdf.py +++ b/asv_bench/benchmarks/io/hdf.py @@ -4,7 +4,7 @@ from pandas import DataFrame, Panel, date_range, HDFStore, read_hdf import pandas.util.testing as tm -from ..pandas_vb_common import BaseIO, setup # noqa +from ..pandas_vb_common import BaseIO class HDFStoreDataFrame(BaseIO): @@ -149,3 +149,6 @@ def time_read_hdf(self, format): def time_write_hdf(self, format): self.df.to_hdf(self.fname, 'df', format=format) + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/json.py b/asv_bench/benchmarks/io/json.py index acfdd327c3b51..df5bf7341c303 100644 --- a/asv_bench/benchmarks/io/json.py +++ b/asv_bench/benchmarks/io/json.py @@ -2,7 +2,7 @@ import pandas.util.testing as tm from pandas import DataFrame, date_range, timedelta_range, concat, read_json -from ..pandas_vb_common import setup, BaseIO # noqa +from ..pandas_vb_common import BaseIO class ReadJSON(BaseIO): @@ -125,3 +125,6 @@ def time_float_int_lines(self, orient): def time_float_int_str_lines(self, orient): self.df_int_float_str.to_json(self.fname, orient='records', lines=True) + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/msgpack.py b/asv_bench/benchmarks/io/msgpack.py index 8ccce01117ca4..7033aa9ce3c40 100644 --- a/asv_bench/benchmarks/io/msgpack.py +++ b/asv_bench/benchmarks/io/msgpack.py @@ -2,7 +2,7 @@ from pandas import DataFrame, date_range, read_msgpack import pandas.util.testing as tm -from ..pandas_vb_common import BaseIO, setup # noqa +from ..pandas_vb_common import BaseIO class MSGPack(BaseIO): @@ -24,3 +24,6 @@ def time_read_msgpack(self): def time_write_msgpack(self): self.df.to_msgpack(self.fname) + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/pickle.py b/asv_bench/benchmarks/io/pickle.py index 2ad0fcca6eb26..0960d721281c7 100644 --- a/asv_bench/benchmarks/io/pickle.py +++ b/asv_bench/benchmarks/io/pickle.py @@ -2,7 +2,7 @@ from pandas import DataFrame, date_range, read_pickle import pandas.util.testing as tm -from ..pandas_vb_common import BaseIO, setup # noqa +from ..pandas_vb_common import BaseIO class Pickle(BaseIO): @@ -24,3 +24,6 @@ def time_read_pickle(self): def time_write_pickle(self): self.df.to_pickle(self.fname) + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/sql.py b/asv_bench/benchmarks/io/sql.py index ef4e501e5f3b9..6a8529cad592b 100644 --- a/asv_bench/benchmarks/io/sql.py +++ b/asv_bench/benchmarks/io/sql.py @@ -5,8 +5,6 @@ from pandas import DataFrame, date_range, read_sql_query, read_sql_table from sqlalchemy import create_engine -from ..pandas_vb_common import setup # noqa - class SQL(object): @@ -130,3 +128,6 @@ def setup(self, dtype): def time_read_sql_table_column(self, dtype): read_sql_table(self.table_name, self.con, columns=[dtype]) + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/io/stata.py b/asv_bench/benchmarks/io/stata.py index e0f5752ca930f..d74a531877e18 100644 --- a/asv_bench/benchmarks/io/stata.py +++ b/asv_bench/benchmarks/io/stata.py @@ -2,7 +2,7 @@ from pandas import DataFrame, date_range, read_stata import pandas.util.testing as tm -from ..pandas_vb_common import BaseIO, setup # noqa +from ..pandas_vb_common import BaseIO class Stata(BaseIO): @@ -35,3 +35,6 @@ def time_read_stata(self, convert_dates): def time_write_stata(self, convert_dates): self.df.to_stata(self.fname, self.convert_dates) + + +from ..pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/join_merge.py b/asv_bench/benchmarks/join_merge.py index 6624c3d0aaf49..57811dec8cd29 100644 --- a/asv_bench/benchmarks/join_merge.py +++ b/asv_bench/benchmarks/join_merge.py @@ -11,7 +11,7 @@ except ImportError: from pandas import ordered_merge as merge_ordered -from .pandas_vb_common import setup # noqa +from .pandas_vb_common import Panel class Append(object): @@ -361,3 +361,6 @@ def time_series_align_int64_index(self): def time_series_align_left_monotonic(self): self.ts1.align(self.ts2, join='left') + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/multiindex_object.py b/asv_bench/benchmarks/multiindex_object.py index 0c92214795557..eaf2bbbe510c2 100644 --- a/asv_bench/benchmarks/multiindex_object.py +++ b/asv_bench/benchmarks/multiindex_object.py @@ -4,8 +4,6 @@ import pandas.util.testing as tm from pandas import date_range, MultiIndex -from .pandas_vb_common import setup # noqa - class GetLoc(object): @@ -138,3 +136,6 @@ def time_datetime_level_values_copy(self, mi): def time_datetime_level_values_sliced(self, mi): mi[:10].values + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/panel_ctor.py b/asv_bench/benchmarks/panel_ctor.py index 4614bbd198afa..b87583ef925f3 100644 --- a/asv_bench/benchmarks/panel_ctor.py +++ b/asv_bench/benchmarks/panel_ctor.py @@ -3,7 +3,7 @@ from pandas import DataFrame, Panel, DatetimeIndex, date_range -from .pandas_vb_common import setup # noqa +from .pandas_vb_common import Panel class DifferentIndexes(object): @@ -58,3 +58,6 @@ def setup(self): 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 index 4d19e9a87c507..e35455f36ed98 100644 --- a/asv_bench/benchmarks/panel_methods.py +++ b/asv_bench/benchmarks/panel_methods.py @@ -3,7 +3,7 @@ import numpy as np from pandas import Panel -from .pandas_vb_common import setup # noqa +from .pandas_vb_common import Panel class PanelMethods(object): @@ -23,3 +23,6 @@ def time_pct_change(self, 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 diff --git a/asv_bench/benchmarks/plotting.py b/asv_bench/benchmarks/plotting.py index 5b49112b0e07d..68dc39b648152 100644 --- a/asv_bench/benchmarks/plotting.py +++ b/asv_bench/benchmarks/plotting.py @@ -7,8 +7,6 @@ import matplotlib matplotlib.use('Agg') -from .pandas_vb_common import setup # noqa - class Plotting(object): @@ -62,3 +60,6 @@ def setup(self): def time_plot_andrews_curves(self): andrews_curves(self.df, "Name") + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/reindex.py b/asv_bench/benchmarks/reindex.py index 413427a16f40b..13f2877e6048d 100644 --- a/asv_bench/benchmarks/reindex.py +++ b/asv_bench/benchmarks/reindex.py @@ -2,7 +2,7 @@ import pandas.util.testing as tm from pandas import (DataFrame, Series, DatetimeIndex, MultiIndex, Index, date_range) -from .pandas_vb_common import setup, lib # noqa +from .pandas_vb_common import lib class Reindex(object): @@ -170,3 +170,6 @@ def setup(self): def time_lib_fast_zip(self): lib.fast_zip(self.col_array_list) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/replace.py b/asv_bench/benchmarks/replace.py index 41208125e8f32..3236b09acec37 100644 --- a/asv_bench/benchmarks/replace.py +++ b/asv_bench/benchmarks/replace.py @@ -1,8 +1,6 @@ import numpy as np import pandas as pd -from .pandas_vb_common import setup # noqa - class FillNa(object): @@ -56,3 +54,6 @@ def setup(self, constructor, replace_data): def time_replace(self, constructor, replace_data): self.data.replace(self.to_replace) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/reshape.py b/asv_bench/benchmarks/reshape.py index 3cf9a32dab398..3140f6fc81cbb 100644 --- a/asv_bench/benchmarks/reshape.py +++ b/asv_bench/benchmarks/reshape.py @@ -5,8 +5,6 @@ from pandas import DataFrame, MultiIndex, date_range, melt, wide_to_long import pandas as pd -from .pandas_vb_common import setup # noqa - class Melt(object): @@ -150,3 +148,6 @@ def time_get_dummies_1d(self): def time_get_dummies_1d_sparse(self): pd.get_dummies(self.s, sparse=True) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/rolling.py b/asv_bench/benchmarks/rolling.py index e3bf551fa5f2b..86294e33e1e06 100644 --- a/asv_bench/benchmarks/rolling.py +++ b/asv_bench/benchmarks/rolling.py @@ -1,8 +1,6 @@ import pandas as pd import numpy as np -from .pandas_vb_common import setup # noqa - class Methods(object): @@ -77,3 +75,6 @@ def setup(self, constructor, window, dtype, percentile, interpolation): def time_quantile(self, constructor, window, dtype, percentile, interpolation): self.roll.quantile(percentile, interpolation=interpolation) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/series_methods.py b/asv_bench/benchmarks/series_methods.py index a26c5d89bc483..2388acbc2d33f 100644 --- a/asv_bench/benchmarks/series_methods.py +++ b/asv_bench/benchmarks/series_methods.py @@ -4,8 +4,6 @@ import pandas.util.testing as tm from pandas import Series, date_range, NaT -from .pandas_vb_common import setup # noqa - class SeriesConstructor(object): @@ -192,3 +190,6 @@ def setup(self): def time_series_datetimeindex_repr(self): getattr(self.s, 'a', None) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/sparse.py b/asv_bench/benchmarks/sparse.py index dcb7694abc2ad..bbc076790a923 100644 --- a/asv_bench/benchmarks/sparse.py +++ b/asv_bench/benchmarks/sparse.py @@ -5,8 +5,6 @@ from pandas import (SparseSeries, SparseDataFrame, SparseArray, Series, date_range, MultiIndex) -from .pandas_vb_common import setup # noqa - def make_array(size, dense_proportion, fill_value, dtype): dense_size = int(size * dense_proportion) @@ -160,3 +158,6 @@ def time_addition(self, fill_value): def time_division(self, fill_value): self.arr1 / self.arr2 + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/stat_ops.py b/asv_bench/benchmarks/stat_ops.py index ecfcb27806f54..3a6223d283073 100644 --- a/asv_bench/benchmarks/stat_ops.py +++ b/asv_bench/benchmarks/stat_ops.py @@ -1,8 +1,6 @@ import numpy as np import pandas as pd -from .pandas_vb_common import setup # noqa - ops = ['mean', 'sum', 'median', 'std', 'skew', 'kurt', 'mad', 'prod', 'sem', 'var'] @@ -112,3 +110,6 @@ def setup(self, method): def time_corr(self, method): self.df.corr(method=method) + + +from .pandas_vb_common import setup # noqa: F401 diff --git a/asv_bench/benchmarks/timeseries.py b/asv_bench/benchmarks/timeseries.py index 2557ba7672a0e..11a789453c2df 100644 --- a/asv_bench/benchmarks/timeseries.py +++ b/asv_bench/benchmarks/timeseries.py @@ -8,8 +8,6 @@ except ImportError: from pandas.tseries.converter import DatetimeConverter -from .pandas_vb_common import setup # noqa - class DatetimeIndex(object): @@ -416,3 +414,6 @@ def time_dt_accessor(self): def time_dt_accessor_normalize(self): self.series.dt.normalize() + + +from .pandas_vb_common import setup # noqa: F401