Skip to content

Commit

Permalink
BUG: rolling.cov with multi-index columns should presever the MI (pan…
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback authored and ri938 committed Jul 7, 2017
1 parent 5362447 commit 59b17cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions doc/source/whatsnew/v0.20.3.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Bug Fixes
- Fixed a pytest marker failing downstream packages' tests suites (:issue:`16680`)
- Bug in reindexing on an empty ``CategoricalIndex`` (:issue:`16770`)
- Fixed bug where computing the rolling covariance of a MultiIndexed ``DataFrame`` improperly raised a ``ValueError`` (:issue:`16789`)
- Fixed a bug in failing to compute rolling computations of a column-MultiIndexed ``DataFrame`` (:issue:`16789`, :issue:`16825`)

Conversion
^^^^^^^^^^
Expand Down
9 changes: 0 additions & 9 deletions pandas/tests/indexes/test_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,6 @@ def f():

tm.assert_raises_regex(ValueError, 'The truth value of a', f)

def test_multi_index_names(self):

# GH 16789
cols = pd.MultiIndex.from_product([['A', 'B'], ['C', 'D', 'E']],
names=['1', '2'])
df = pd.DataFrame(np.ones((10, 6)), columns=cols)
rolling_result = df.rolling(3).cov()
assert rolling_result.index.names == [None, '1', '2']

def test_labels_dtypes(self):

# GH 8456
Expand Down

0 comments on commit 59b17cd

Please sign in to comment.