|
7 | 7 | import pandas as pd
|
8 | 8 | import pandas.util.testing as tm
|
9 | 9 | import pytest
|
10 |
| -from pandas import (CategoricalIndex, DataFrame, DatetimeIndex, Float64Index, |
11 |
| - Index, Int64Index, IntervalIndex, MultiIndex, PeriodIndex, |
12 |
| - RangeIndex, Series, TimedeltaIndex, UInt64Index, compat, |
13 |
| - date_range, isna, period_range) |
14 |
| -from pandas.compat import PYPY, lrange, lzip, range, u |
| 10 | +from pandas import (DataFrame, DatetimeIndex, Float64Index, Index, Int64Index, |
| 11 | + MultiIndex, PeriodIndex, TimedeltaIndex, UInt64Index, |
| 12 | + compat, date_range, period_range) |
| 13 | +from pandas.compat import lrange, range, u |
15 | 14 | from pandas.core.dtypes.dtypes import CategoricalDtype
|
16 | 15 | from pandas.core.indexes.datetimelike import DatetimeIndexOpsMixin
|
17 | 16 | from pandas.util.testing import assert_copy
|
@@ -480,17 +479,17 @@ def test_multiindex_compare():
|
480 | 479 | # Ensure comparison operations for MultiIndex with nlevels == 1
|
481 | 480 | # behave consistently with those for MultiIndex with nlevels > 1
|
482 | 481 |
|
483 |
| - midx = pd.MultiIndex.from_product([[0, 1]]) |
| 482 | + midx = pd.MultiIndex.from_product([[0, 1]]) |
484 | 483 |
|
485 |
| - # Equality self-test: MultiIndex object vs self |
486 |
| - expected = pd.Series([True, True]) |
487 |
| - result = pd.Series(midx == midx) |
488 |
| - tm.assert_series_equal(result, expected) |
| 484 | + # Equality self-test: MultiIndex object vs self |
| 485 | + expected = pd.Series([True, True]) |
| 486 | + result = pd.Series(midx == midx) |
| 487 | + tm.assert_series_equal(result, expected) |
489 | 488 |
|
490 |
| - # Greater than comparison: MultiIndex object vs self |
491 |
| - expected = pd.Series([False, False]) |
492 |
| - result = pd.Series(midx > midx) |
493 |
| - tm.assert_series_equal(result, expected) |
| 489 | + # Greater than comparison: MultiIndex object vs self |
| 490 | + expected = pd.Series([False, False]) |
| 491 | + result = pd.Series(midx > midx) |
| 492 | + tm.assert_series_equal(result, expected) |
494 | 493 |
|
495 | 494 |
|
496 | 495 | def test_duplicate_multiindex_labels():
|
@@ -653,6 +652,7 @@ def f(a):
|
653 | 652 | tm.assert_numpy_array_equal(mi.duplicated(), np.zeros(
|
654 | 653 | len(mi), dtype='bool'))
|
655 | 654 |
|
| 655 | + |
656 | 656 | def test_map(idx):
|
657 | 657 | # callable
|
658 | 658 | index = idx
|
|
0 commit comments