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

Function test_get_complex_nested

pandas/tests/strings/test_split_partition.py:756–765  ·  view source on GitHub ↗
(to_type)

Source from the content-addressed store, hash-verified

754
755@pytest.mark.parametrize("to_type", [tuple, list, np.array])
756def test_get_complex_nested(to_type):
757 ser = Series([to_type([to_type([1, 2])])])
758
759 result = ser.str.get(0)
760 expected = Series([to_type([1, 2])])
761 tm.assert_series_equal(result, expected)
762
763 result = ser.str.get(1)
764 expected = Series([np.nan])
765 tm.assert_series_equal(result, expected)
766
767
768def test_get_strings(any_string_dtype):

Callers

nothing calls this directly

Calls 2

SeriesClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected