Skip to content

Commit

Permalink
STY: proposed isort settings [ci skip] [skip ci] [ciskip] [skipci] (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrockmendel authored and tm9k1 committed Nov 19, 2018
1 parent c51cbda commit bf8309e
Show file tree
Hide file tree
Showing 163 changed files with 717 additions and 598 deletions.
30 changes: 15 additions & 15 deletions pandas/core/arrays/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@

import numpy as np

import pandas._libs.sparse as splib
import pandas.core.algorithms as algos
import pandas.core.common as com
import pandas.io.formats.printing as printing
from pandas import compat
from pandas._libs import index as libindex, lib
import pandas._libs.sparse as splib
from pandas._libs.sparse import BlockIndex, IntIndex
from pandas._libs.tslibs import NaT
import pandas.compat as compat
from pandas.compat.numpy import function as nv
from pandas.core.accessor import PandasDelegate, delegate_names
from pandas.core.arrays import ExtensionArray, ExtensionOpsMixin
from pandas.core.base import PandasObject
from pandas.errors import PerformanceWarning

from pandas.core.dtypes.base import ExtensionDtype
from pandas.core.dtypes.cast import (
astype_nansafe, construct_1d_arraylike_from_scalar, find_common_type,
infer_dtype_from_scalar, maybe_convert_platform
)
infer_dtype_from_scalar, maybe_convert_platform)
from pandas.core.dtypes.common import (
is_array_like, is_bool_dtype, is_datetime64_any_dtype, is_dtype_equal,
is_integer, is_list_like, is_object_dtype, is_scalar, is_string_dtype,
pandas_dtype
)
pandas_dtype)
from pandas.core.dtypes.dtypes import register_extension_dtype
from pandas.core.dtypes.generic import (
ABCIndexClass, ABCSeries, ABCSparseSeries
)
ABCIndexClass, ABCSeries, ABCSparseSeries)
from pandas.core.dtypes.missing import isna, na_value_for_dtype, notna

from pandas.core.accessor import PandasDelegate, delegate_names
import pandas.core.algorithms as algos
from pandas.core.arrays import ExtensionArray, ExtensionOpsMixin
from pandas.core.base import PandasObject
import pandas.core.common as com
from pandas.core.missing import interpolate_2d
from pandas.errors import PerformanceWarning

import pandas.io.formats.printing as printing


# ----------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion pandas/core/groupby/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

import types

from pandas.core.dtypes.common import is_list_like, is_scalar
from pandas.util._decorators import make_signature

from pandas.core.dtypes.common import is_list_like, is_scalar


class GroupByMixin(object):
""" provide the groupby facilities to the mixed object """
Expand Down
3 changes: 1 addition & 2 deletions pandas/core/groupby/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

from pandas.core.algorithms import unique1d
from pandas.core.arrays.categorical import (
Categorical, CategoricalDtype, _recode_for_categories
)
Categorical, CategoricalDtype, _recode_for_categories)


def recode_for_groupby(c, sort, observed):
Expand Down
25 changes: 13 additions & 12 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,40 @@

import collections
import copy
import warnings
from functools import partial
from textwrap import dedent
import warnings

import numpy as np

import pandas.core.algorithms as algorithms
import pandas.core.common as com
import pandas.core.indexes.base as ibase
from pandas import compat
from pandas._libs import Timestamp, lib
import pandas.compat as compat
from pandas.compat import lzip, map
from pandas.compat.numpy import _np_version_under1p13
from pandas.core.arrays import Categorical
from pandas.core.base import DataError, SpecificationError
from pandas.util._decorators import Appender, Substitution

from pandas.core.dtypes.cast import maybe_downcast_to_dtype
from pandas.core.dtypes.common import (
ensure_int64, ensure_platform_int, is_bool, is_datetimelike,
is_integer_dtype, is_interval_dtype, is_numeric_dtype, is_scalar
)
is_integer_dtype, is_interval_dtype, is_numeric_dtype, is_scalar)
from pandas.core.dtypes.missing import isna, notna

import pandas.core.algorithms as algorithms
from pandas.core.arrays import Categorical
from pandas.core.base import DataError, SpecificationError
import pandas.core.common as com
from pandas.core.frame import DataFrame
from pandas.core.generic import NDFrame, _shared_docs
from pandas.core.groupby import base
from pandas.core.groupby.groupby import (
GroupBy, _apply_docs, _transform_template
)
GroupBy, _apply_docs, _transform_template)
from pandas.core.index import CategoricalIndex, Index, MultiIndex
import pandas.core.indexes.base as ibase
from pandas.core.internals import BlockManager, make_block
from pandas.core.panel import Panel
from pandas.core.series import Series

from pandas.plotting._core import boxplot_frame_groupby
from pandas.util._decorators import Appender, Substitution


class NDFrameGroupBy(GroupBy):
Expand Down
23 changes: 12 additions & 11 deletions pandas/core/groupby/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,36 @@ class providing the base-class of operations.
"""

import collections
from contextlib import contextmanager
import datetime
from functools import partial, wraps
import types
import warnings
from contextlib import contextmanager
from functools import partial, wraps

import numpy as np

import pandas.core.algorithms as algorithms
import pandas.core.common as com
from pandas import compat
from pandas._libs import Timestamp, groupby as libgroupby
import pandas.compat as compat
from pandas.compat import callable, range, set_function_name, zip
from pandas.compat.numpy import function as nv
from pandas.core.base import (
DataError, GroupByError, PandasObject, SelectionMixin, SpecificationError
)
from pandas.core.config import option_context
from pandas.util._decorators import Appender, Substitution, cache_readonly
from pandas.util._validators import validate_kwargs

from pandas.core.dtypes.cast import maybe_downcast_to_dtype
from pandas.core.dtypes.common import ensure_float, is_numeric_dtype, is_scalar
from pandas.core.dtypes.missing import isna, notna

import pandas.core.algorithms as algorithms
from pandas.core.base import (
DataError, GroupByError, PandasObject, SelectionMixin, SpecificationError)
import pandas.core.common as com
from pandas.core.config import option_context
from pandas.core.frame import DataFrame
from pandas.core.generic import NDFrame
from pandas.core.groupby import base
from pandas.core.index import Index, MultiIndex
from pandas.core.series import Series
from pandas.core.sorting import get_group_index_sorter
from pandas.util._decorators import Appender, Substitution, cache_readonly
from pandas.util._validators import validate_kwargs

_doc_template = """
Expand Down
16 changes: 9 additions & 7 deletions pandas/core/groupby/grouper.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,24 @@

import numpy as np

import pandas.core.algorithms as algorithms
import pandas.core.common as com
from pandas import compat
import pandas.compat as compat
from pandas.compat import callable, zip
from pandas.core.arrays import Categorical, ExtensionArray
from pandas.util._decorators import cache_readonly

from pandas.core.dtypes.common import (
ensure_categorical, is_categorical_dtype, is_datetime64_dtype, is_hashable,
is_list_like, is_scalar, is_timedelta64_dtype
)
is_list_like, is_scalar, is_timedelta64_dtype)
from pandas.core.dtypes.generic import ABCSeries

import pandas.core.algorithms as algorithms
from pandas.core.arrays import Categorical, ExtensionArray
import pandas.core.common as com
from pandas.core.frame import DataFrame
from pandas.core.groupby.ops import BaseGrouper
from pandas.core.index import CategoricalIndex, Index, MultiIndex
from pandas.core.series import Series

from pandas.io.formats.printing import pprint_thing
from pandas.util._decorators import cache_readonly


class Grouper(object):
Expand Down
16 changes: 8 additions & 8 deletions pandas/core/groupby/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@

import numpy as np

import pandas.core.algorithms as algorithms
import pandas.core.common as com
from pandas._libs import NaT, groupby as libgroupby, iNaT, lib, reduction
from pandas.compat import lzip, range, zip
from pandas.core.base import SelectionMixin
from pandas.util._decorators import cache_readonly

from pandas.core.dtypes.common import (
ensure_float64, ensure_int64, ensure_int64_or_float64, ensure_object,
ensure_platform_int, is_bool_dtype, is_categorical_dtype, is_complex_dtype,
is_datetime64_any_dtype, is_integer_dtype, is_numeric_dtype,
is_timedelta64_dtype, needs_i8_conversion
)
is_timedelta64_dtype, needs_i8_conversion)
from pandas.core.dtypes.missing import _maybe_fill, isna

import pandas.core.algorithms as algorithms
from pandas.core.base import SelectionMixin
import pandas.core.common as com
from pandas.core.frame import DataFrame
from pandas.core.generic import NDFrame
from pandas.core.groupby import base
from pandas.core.index import Index, MultiIndex, ensure_index
from pandas.core.series import Series
from pandas.core.sorting import (
compress_group_index, decons_obs_group_ids, get_flattened_iterator,
get_group_index, get_group_index_sorter, get_indexer_dict
)
from pandas.util._decorators import cache_readonly
get_group_index, get_group_index_sorter, get_indexer_dict)


def generate_bins_generic(values, binner, closed):
Expand Down
19 changes: 10 additions & 9 deletions pandas/core/indexes/range.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import operator
import warnings
from datetime import timedelta
import operator
from sys import getsizeof
import warnings

import numpy as np

import pandas.core.common as com
import pandas.core.indexes.base as ibase
from pandas import compat
from pandas._libs import index as libindex
import pandas.compat as compat
from pandas.compat import get_range_parameters, lrange, range
from pandas.compat.numpy import function as nv
from pandas.core import ops
from pandas.util._decorators import Appender, cache_readonly

from pandas.core.dtypes import concat as _concat
from pandas.core.dtypes.common import (
is_int64_dtype, is_integer, is_scalar, is_timedelta64_dtype
)
is_int64_dtype, is_integer, is_scalar, is_timedelta64_dtype)
from pandas.core.dtypes.generic import ABCSeries, ABCTimedeltaIndex

from pandas.core import ops
import pandas.core.common as com
import pandas.core.indexes.base as ibase
from pandas.core.indexes.base import Index, _index_shared_docs
from pandas.core.indexes.numeric import Int64Index
from pandas.util._decorators import Appender, cache_readonly


class RangeIndex(Int64Index):
Expand Down
52 changes: 23 additions & 29 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,64 +3,58 @@
"""
from __future__ import division

import warnings
from textwrap import dedent
import warnings

import numpy as np
import numpy.ma as ma

import pandas.core.algorithms as algorithms
import pandas.core.common as com
import pandas.core.indexes.base as ibase
import pandas.core.nanops as nanops
import pandas.core.ops as ops
import pandas.io.formats.format as fmt
import pandas.plotting._core as gfx
from pandas import compat
from pandas._libs import iNaT, index as libindex, lib, tslibs
import pandas.compat as compat
from pandas.compat import (
PY36, OrderedDict, StringIO, get_range_parameters, range, u, zip
)
PY36, OrderedDict, StringIO, get_range_parameters, range, u, zip)
from pandas.compat.numpy import function as nv
from pandas.core import base, generic
from pandas.core.accessor import CachedAccessor
from pandas.core.arrays import ExtensionArray, SparseArray, period_array
from pandas.core.arrays.categorical import Categorical, CategoricalAccessor
from pandas.core.arrays.sparse import SparseAccessor
from pandas.core.config import get_option
from pandas.util._decorators import Appender, Substitution, deprecate
from pandas.util._validators import validate_bool_kwarg

from pandas.core.dtypes.cast import (
construct_1d_arraylike_from_scalar, construct_1d_ndarray_preserving_na,
construct_1d_object_array_from_listlike, infer_dtype_from_scalar,
maybe_cast_to_datetime, maybe_cast_to_integer_array, maybe_castable,
maybe_convert_platform, maybe_upcast
)
maybe_convert_platform, maybe_upcast)
from pandas.core.dtypes.common import (
_is_unorderable_exception, ensure_platform_int, is_bool,
is_categorical_dtype, is_datetime64tz_dtype, is_datetimelike, is_dict_like,
is_extension_array_dtype, is_extension_type, is_float_dtype, is_hashable,
is_integer, is_integer_dtype, is_iterator, is_list_like, is_object_dtype,
is_scalar, is_string_like, is_timedelta64_dtype, pandas_dtype
)
is_scalar, is_string_like, is_timedelta64_dtype, pandas_dtype)
from pandas.core.dtypes.generic import (
ABCDataFrame, ABCIndexClass, ABCSeries, ABCSparseArray, ABCSparseSeries
)
ABCDataFrame, ABCIndexClass, ABCSeries, ABCSparseArray, ABCSparseSeries)
from pandas.core.dtypes.missing import (
isna, na_value_for_dtype, notna, remove_na_arraylike
)
isna, na_value_for_dtype, notna, remove_na_arraylike)

from pandas.core import algorithms, base, generic, nanops, ops
from pandas.core.accessor import CachedAccessor
from pandas.core.arrays import ExtensionArray, SparseArray, period_array
from pandas.core.arrays.categorical import Categorical, CategoricalAccessor
from pandas.core.arrays.sparse import SparseAccessor
import pandas.core.common as com
from pandas.core.config import get_option
from pandas.core.index import (
Float64Index, Index, InvalidIndexError, MultiIndex, ensure_index
)
Float64Index, Index, InvalidIndexError, MultiIndex, ensure_index)
from pandas.core.indexes.accessors import CombinedDatetimelikeProperties
import pandas.core.indexes.base as ibase
from pandas.core.indexes.datetimes import DatetimeIndex
from pandas.core.indexes.period import PeriodIndex
from pandas.core.indexes.timedeltas import TimedeltaIndex
from pandas.core.indexing import check_bool_indexer, maybe_convert_indices
from pandas.core.internals import SingleBlockManager
from pandas.core.strings import StringMethods
from pandas.core.tools.datetimes import to_datetime

import pandas.io.formats.format as fmt
from pandas.io.formats.terminal import get_terminal_size
from pandas.util._decorators import Appender, Substitution, deprecate
from pandas.util._validators import validate_bool_kwarg
import pandas.plotting._core as gfx

# pylint: disable=E1101,E1103
# pylint: disable=W0703,W0622,W0613,W0201
Expand Down
5 changes: 4 additions & 1 deletion pandas/io/clipboards.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
""" io on the clipboard """
import warnings

from pandas import compat, get_option, option_context
import pandas.compat as compat
from pandas.compat import PY2, PY3, StringIO

from pandas.core.dtypes.generic import ABCDataFrame

from pandas import get_option, option_context


def read_clipboard(sep=r'\s+', **kwargs): # pragma: no cover
r"""
Expand Down
Loading

0 comments on commit bf8309e

Please sign in to comment.