44import numpy as np
55import pytest
66
7- from pandas .compat import PY37 , is_platform_windows
7+ from pandas .compat import PY37
88
99import pandas as pd
1010from pandas import (
@@ -209,10 +209,9 @@ def test_level_get_group(observed):
209209 assert_frame_equal (result , expected )
210210
211211
212- # GH#21636 previously flaky on py37
213- @pytest .mark .xfail (
214- is_platform_windows () and PY37 , reason = "Flaky, GH-27902" , strict = False
215- )
212+ # GH#21636 flaky on py37; may be related to older numpy, see discussion
213+ # https://github.com/MacPython/pandas-wheels/pull/64
214+ @pytest .mark .xfail (PY37 , reason = "Flaky, GH-27902" , strict = False )
216215@pytest .mark .parametrize ("ordered" , [True , False ])
217216def test_apply (ordered ):
218217 # GH 10138
@@ -229,6 +228,9 @@ def test_apply(ordered):
229228 idx = MultiIndex .from_arrays ([missing , dense ], names = ["missing" , "dense" ])
230229 expected = DataFrame ([0 , 1 , 2.0 ], index = idx , columns = ["values" ])
231230
231+ # GH#21636 tracking down the xfail, in some builds np.mean(df.loc[[0]])
232+ # is coming back as Series([0., 1., 0.], index=["missing", "dense", "values"])
233+ # when we expect Series(0., index=["values"])
232234 result = grouped .apply (lambda x : np .mean (x ))
233235 assert_frame_equal (result , expected )
234236
0 commit comments