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

Function test_reindex_inference

pandas/tests/series/methods/test_reindex.py:147–153  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

145
146
147def test_reindex_inference():
148 # inference of new dtype
149 s = Series([True, False, False, True], index=list("abcd"))
150 new_index = "agc"
151 result = s.reindex(list(new_index)).ffill()
152 expected = Series([True, True, False], index=list(new_index), dtype=object)
153 tm.assert_series_equal(result, expected)
154
155
156def test_reindex_downcasting():

Callers

nothing calls this directly

Calls 3

reindexMethod · 0.95
SeriesClass · 0.90
ffillMethod · 0.45

Tested by

no test coverage detected