Skip to content

Commit b7b7091

Browse files
sinhrksjreback
authored andcommitted
PEP8: pandas/indexes
Author: sinhrks <sinhrks@gmail.com> Closes #12786 from sinhrks/pep_indexes and squashes the following commits: f7ec60e [sinhrks] PEP8: pandas/indexes
1 parent 4038a1c commit b7b7091

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

ci/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RET=0
88

99
if [ "$LINT" ]; then
1010
echo "Linting"
11-
for path in 'core' 'io' 'stats' 'compat' 'sparse' 'tools' 'tseries' 'tests' 'computation' 'util'
11+
for path in 'core' 'indexes' 'io' 'stats' 'compat' 'sparse' 'tools' 'tseries' 'tests' 'computation' 'util'
1212
do
1313
echo "linting -> pandas/$path"
1414
flake8 pandas/$path --filename '*.py'

pandas/indexes/base.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ def _simple_new(cls, values, name=None, dtype=None, **kwargs):
339339
values : the values to create the new Index, optional
340340
kwargs : updates the default attributes for this Index
341341
"""
342+
342343
@Appender(_index_shared_docs['_shallow_copy'])
343344
def _shallow_copy(self, values=None, **kwargs):
344345
if values is None:
@@ -1349,6 +1350,7 @@ def _ensure_compat_concat(indexes):
13491350
--------
13501351
numpy.ndarray.take
13511352
"""
1353+
13521354
@Appender(_index_shared_docs['take'])
13531355
def take(self, indices, axis=0, allow_fill=True, fill_value=None):
13541356
indices = com._ensure_platform_int(indices)
@@ -1848,8 +1850,8 @@ def symmetric_difference(self, other, result_name=None):
18481850
18491851
Notes
18501852
-----
1851-
``symmetric_difference`` contains elements that appear in either ``idx1`` or
1852-
``idx2`` but not both. Equivalent to the Index created by
1853+
``symmetric_difference`` contains elements that appear in either
1854+
``idx1`` or ``idx2`` but not both. Equivalent to the Index created by
18531855
``(idx1 - idx2) + (idx2 - idx1)`` with duplicates dropped.
18541856
18551857
The sorting of a result containing ``NaN`` values is not guaranteed

pandas/indexes/multi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from pandas.compat import range, zip, lrange, lzip, map
1414
from pandas import compat
15-
from pandas.core.base import FrozenList, FrozenNDArray
15+
from pandas.core.base import FrozenList
1616
import pandas.core.base as base
1717
from pandas.util.decorators import (Appender, cache_readonly,
1818
deprecate, deprecate_kwarg)
@@ -1008,9 +1008,9 @@ def __getitem__(self, key):
10081008
def take(self, indices, axis=0, allow_fill=True, fill_value=None):
10091009
indices = com._ensure_platform_int(indices)
10101010
taken = self._assert_take_fillable(self.labels, indices,
1011-
allow_fill=allow_fill,
1012-
fill_value=fill_value,
1013-
na_value=-1)
1011+
allow_fill=allow_fill,
1012+
fill_value=fill_value,
1013+
na_value=-1)
10141014
return MultiIndex(levels=self.levels, labels=taken,
10151015
names=self.names, verify_integrity=False)
10161016

0 commit comments

Comments
 (0)