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

Function test_explode_sets

pandas/tests/frame/methods/test_explode.py:218–223  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

216
217
218def test_explode_sets():
219 # https://github.com/pandas-dev/pandas/issues/35614
220 df = pd.DataFrame({"a": [{"x", "y"}], "b": [1]}, index=[1])
221 result = df.explode(column="a").sort_values(by="a")
222 expected = pd.DataFrame({"a": ["x", "y"], "b": [1, 1]}, index=[1, 1])
223 tm.assert_frame_equal(result, expected)
224
225
226@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

explodeMethod · 0.95
sort_valuesMethod · 0.45

Tested by

no test coverage detected