MCPcopy
hub / github.com/pandas-dev/pandas / test_valid

Method test_valid

pandas/tests/series/test_missing.py:67–75  ·  view source on GitHub ↗
(self, datetime_series)

Source from the content-addressed store, hash-verified

65 tm.assert_series_equal(selector, expected)
66
67 def test_valid(self, datetime_series):
68 ts = datetime_series.copy()
69 ts.index = ts.index._with_freq(None)
70 ts[::2] = np.nan
71
72 result = ts.dropna()
73 assert len(result) == ts.count()
74 tm.assert_series_equal(result, ts[1::2])
75 tm.assert_series_equal(result, ts[pd.notna(ts)])
76
77
78def test_hasnans_uncached_for_series():

Callers

nothing calls this directly

Calls 5

copyMethod · 0.45
_with_freqMethod · 0.45
dropnaMethod · 0.45
countMethod · 0.45
notnaMethod · 0.45

Tested by

no test coverage detected