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

Function test_get_mixed_object

pandas/tests/strings/test_split_partition.py:726–732  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

724
725
726def test_get_mixed_object():
727 ser = Series(["a_b_c", np.nan, "c_d_e", True, datetime.today(), None, 1, 2.0])
728 result = ser.str.split("_").str.get(1)
729 expected = Series(
730 ["b", np.nan, "d", np.nan, np.nan, None, np.nan, np.nan], dtype=object
731 )
732 tm.assert_series_equal(result, expected)
733
734
735@pytest.mark.parametrize("idx", [2, -3])

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
splitMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected