Skip to content

Commit

Permalink
Run isort
Browse files Browse the repository at this point in the history
  • Loading branch information
thoo committed Jan 1, 2019
1 parent d5283ea commit fbe5606
Show file tree
Hide file tree
Showing 36 changed files with 232 additions and 325 deletions.
5 changes: 3 additions & 2 deletions pandas/tests/frame/common.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import numpy as np

from pandas import compat
from pandas.util._decorators import cache_readonly
import pandas.util.testing as tm

import pandas as pd
from pandas import compat
import pandas.util.testing as tm

_seriesd = tm.getSeriesData()
_tsd = tm.getTimeSeriesData()
Expand Down
6 changes: 2 additions & 4 deletions pandas/tests/frame/conftest.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import pytest

import numpy as np
import pytest

from pandas import compat
from pandas import DataFrame, NaT, compat, date_range
import pandas.util.testing as tm
from pandas import DataFrame, date_range, NaT


@pytest.fixture
Expand Down
18 changes: 8 additions & 10 deletions pandas/tests/frame/test_alter_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@

from __future__ import print_function

import inspect
import pytest

from datetime import datetime, timedelta
import inspect

import numpy as np
import pytest

from pandas.compat import PY2, lrange

from pandas.compat import lrange, PY2
from pandas import (DataFrame, Series, Index, MultiIndex, RangeIndex,
IntervalIndex, DatetimeIndex, Categorical, cut,
Timestamp, date_range, to_datetime)
from pandas.core.dtypes.common import (
is_object_dtype,
is_categorical_dtype,
is_interval_dtype)
is_categorical_dtype, is_interval_dtype, is_object_dtype)

from pandas import (
Categorical, DataFrame, DatetimeIndex, Index, IntervalIndex, MultiIndex,
RangeIndex, Series, Timestamp, cut, date_range, to_datetime)
import pandas.util.testing as tm


Expand Down
22 changes: 11 additions & 11 deletions pandas/tests/frame/test_analytics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@

from __future__ import print_function

import warnings
from datetime import timedelta
import operator
import pytest

from string import ascii_lowercase
import warnings

import numpy as np
from numpy import nan
from numpy.random import randn
import numpy as np
import pytest

from pandas.compat import PY35, lrange
import pandas.util._test_decorators as td

from pandas.compat import lrange, PY35
from pandas import (compat, isna, notna, DataFrame, Series,
MultiIndex, date_range, Timestamp, Categorical,
to_datetime, to_timedelta)
import pandas as pd
import pandas.core.nanops as nanops
from pandas import (
Categorical, DataFrame, MultiIndex, Series, Timestamp, compat, date_range,
isna, notna, to_datetime, to_timedelta)
import pandas.core.algorithms as algorithms

import pandas.core.nanops as nanops
import pandas.util.testing as tm
import pandas.util._test_decorators as td


def assert_stat_op_calc(opname, alternative, frame, has_skipna=True,
Expand Down
22 changes: 9 additions & 13 deletions pandas/tests/frame/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,23 @@

from __future__ import print_function

import pytest

# pylint: disable-msg=W0612,E1101
from copy import deepcopy
import pydoc

from pandas.compat import range, lrange, long
from pandas import compat

from numpy.random import randn
import numpy as np
from numpy.random import randn
import pytest

from pandas import (DataFrame, Series, date_range, timedelta_range,
Categorical, SparseDataFrame)
import pandas as pd

from pandas.util.testing import (assert_almost_equal,
assert_series_equal,
assert_frame_equal)
from pandas.compat import long, lrange, range

import pandas as pd
from pandas import (
Categorical, DataFrame, Series, SparseDataFrame, compat, date_range,
timedelta_range)
import pandas.util.testing as tm
from pandas.util.testing import (
assert_almost_equal, assert_frame_equal, assert_series_equal)


class SharedWithSparse(object):
Expand Down
19 changes: 9 additions & 10 deletions pandas/tests/frame/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,24 @@

from __future__ import print_function

import pytest

import operator
from collections import OrderedDict
from datetime import datetime
from itertools import chain

import operator
import warnings

import numpy as np
import pytest

from pandas import (notna, DataFrame, Series, MultiIndex, date_range,
Timestamp, compat)
import pandas as pd
from pandas.core.dtypes.dtypes import CategoricalDtype

import pandas as pd
from pandas import (
DataFrame, MultiIndex, Series, Timestamp, compat, date_range, notna)
from pandas.conftest import _get_cython_table_params
from pandas.core.apply import frame_apply
from pandas.util.testing import (assert_series_equal,
assert_frame_equal)
import pandas.util.testing as tm
from pandas.conftest import _get_cython_table_params
from pandas.util.testing import assert_frame_equal, assert_series_equal


@pytest.fixture
Expand Down
6 changes: 2 additions & 4 deletions pandas/tests/frame/test_arithmetic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
from datetime import datetime
import operator

import pytest
import numpy as np
import pytest

from pandas.compat import range

import pandas as pd
import pandas.util.testing as tm

from pandas.tests.frame.common import _check_mixed_float, _check_mixed_int

import pandas.util.testing as tm

# -------------------------------------------------------------------
# Comparisons
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/frame/test_asof.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@

import numpy as np
import pytest
from pandas import (DataFrame, date_range, Timestamp, Series,
to_datetime)

from pandas import DataFrame, Series, Timestamp, date_range, to_datetime
import pandas.util.testing as tm

from .common import TestData
Expand Down
18 changes: 8 additions & 10 deletions pandas/tests/frame/test_axis_select_reindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,22 @@

from __future__ import print_function

import pytest

from datetime import datetime

from numpy import random
import numpy as np
from numpy import random
import pytest

from pandas.compat import lrange, lzip, u
from pandas import (compat, DataFrame, Series, Index, MultiIndex, Categorical,
date_range, isna)
import pandas as pd

from pandas.util.testing import assert_frame_equal

from pandas.errors import PerformanceWarning
import pandas.util.testing as tm

import pandas as pd
from pandas import (
Categorical, DataFrame, Index, MultiIndex, Series, compat, date_range,
isna)
from pandas.tests.frame.common import TestData
import pandas.util.testing as tm
from pandas.util.testing import assert_frame_equal


class TestDataFrameSelectReindex(TestData):
Expand Down
23 changes: 10 additions & 13 deletions pandas/tests/frame/test_block_internals.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,24 @@

from __future__ import print_function

import pytest

from datetime import datetime, timedelta
import itertools

from numpy import nan
import numpy as np
from numpy import nan
import pytest

from pandas import (DataFrame, Series, Timestamp, date_range, compat,
option_context, Categorical)
from pandas.core.internals.blocks import IntBlock
from pandas.core.arrays import IntervalArray, integer_array
from pandas.compat import StringIO
import pandas as pd

from pandas.util.testing import (assert_almost_equal,
assert_series_equal,
assert_frame_equal)

import pandas as pd
from pandas import (
Categorical, DataFrame, Series, Timestamp, compat, date_range,
option_context)
from pandas.core.arrays import IntervalArray, integer_array
from pandas.core.internals.blocks import IntBlock
import pandas.util.testing as tm

from pandas.util.testing import (
assert_almost_equal, assert_frame_equal, assert_series_equal)

# Segregated collection of methods that require the BlockManager internal data
# structure
Expand Down
8 changes: 3 additions & 5 deletions pandas/tests/frame/test_combine_concat.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@

from datetime import datetime

import pytest
import numpy as np
from numpy import nan
import pytest

import pandas as pd

from pandas import DataFrame, Index, Series, Timestamp, date_range
from pandas.compat import lrange

import pandas as pd
from pandas import DataFrame, Index, Series, Timestamp, date_range
from pandas.tests.frame.common import TestData

import pandas.util.testing as tm
from pandas.util.testing import assert_frame_equal, assert_series_equal

Expand Down
25 changes: 12 additions & 13 deletions pandas/tests/frame/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,25 @@
import functools
import itertools

import pytest
from numpy.random import randn

import numpy as np
import numpy.ma as ma
import numpy.ma.mrecords as mrecords
from numpy.random import randn
import pytest

from pandas.compat import (
PY3, PY36, OrderedDict, is_platform_little_endian, lmap, long, lrange,
lzip, range, zip)

from pandas.core.dtypes.common import is_integer_dtype
from pandas.compat import (lmap, long, zip, range, lrange, lzip,
OrderedDict, is_platform_little_endian, PY3, PY36)
from pandas import compat
from pandas import (DataFrame, Index, Series, isna,
MultiIndex, Timedelta, Timestamp,
date_range, Categorical)
import pandas as pd
import pandas.util.testing as tm
from pandas.core.dtypes.cast import construct_1d_object_array_from_listlike
from pandas.core.dtypes.common import is_integer_dtype

import pandas as pd
from pandas import (
Categorical, DataFrame, Index, MultiIndex, Series, Timedelta, Timestamp,
compat, date_range, isna)
from pandas.tests.frame.common import TestData

import pandas.util.testing as tm

MIXED_FLOAT_DTYPES = ['float16', 'float32', 'float64']
MIXED_INT_DTYPES = ['uint8', 'uint16', 'uint32', 'uint64', 'int8', 'int16',
Expand Down
12 changes: 5 additions & 7 deletions pandas/tests/frame/test_convert_to.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
# -*- coding: utf-8 -*-

import collections
from collections import OrderedDict, defaultdict
from datetime import datetime

import numpy as np
import pytest
import pytz
import collections
from collections import OrderedDict, defaultdict
import numpy as np

from pandas import compat
from pandas.compat import long
from pandas import (DataFrame, Series, MultiIndex, Timestamp,
date_range)

import pandas.util.testing as tm
from pandas import DataFrame, MultiIndex, Series, Timestamp, compat, date_range
from pandas.tests.frame.common import TestData
import pandas.util.testing as tm


class TestDataFrameConvertTo(TestData):
Expand Down
20 changes: 10 additions & 10 deletions pandas/tests/frame/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

from __future__ import print_function

import pytest

from datetime import timedelta

import numpy as np
from pandas import (DataFrame, Series, date_range, Timedelta, Timestamp,
Categorical, compat, concat, option_context)
import pytest

from pandas.compat import u
from pandas import _np_version_under1p14

from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype

import pandas as pd
from pandas import (
Categorical, DataFrame, Series, Timedelta, Timestamp,
_np_version_under1p14, compat, concat, date_range, option_context)
from pandas.core.arrays import integer_array
from pandas.core.dtypes.dtypes import DatetimeTZDtype, CategoricalDtype
from pandas.tests.frame.common import TestData
from pandas.util.testing import (assert_series_equal,
assert_frame_equal,
makeCustomDataframe as mkdf)
import pandas.util.testing as tm
import pandas as pd
from pandas.util.testing import (
assert_frame_equal, assert_series_equal, makeCustomDataframe as mkdf)


@pytest.fixture(params=[str, compat.text_type])
Expand Down
Loading

0 comments on commit fbe5606

Please sign in to comment.