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

Function test_get_with_dict_label

pandas/tests/strings/test_strings.py:853–867  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

851
852
853def test_get_with_dict_label():
854 # GH47911
855 s = Series(
856 [
857 {"name": "Hello", "value": "World"},
858 {"name": "Goodbye", "value": "Planet"},
859 {"value": "Sea"},
860 ]
861 )
862 result = s.str.get("name")
863 expected = Series(["Hello", "Goodbye", None], dtype=object)
864 tm.assert_series_equal(result, expected)
865 result = s.str.get("value")
866 expected = Series(["World", "Planet", "Sea"], dtype=object)
867 tm.assert_series_equal(result, expected)
868
869
870def test_series_str_decode():

Callers

nothing calls this directly

Calls 2

SeriesClass · 0.90
getMethod · 0.45

Tested by

no test coverage detected