(input_subset, error_message)
| 41 | ], |
| 42 | ) |
| 43 | def test_error_multi_columns(input_subset, error_message): |
| 44 | # GH 39240 |
| 45 | df = pd.DataFrame( |
| 46 | { |
| 47 | "A": [[0, 1, 2], np.nan, [], (3, 4)], |
| 48 | "B": 1, |
| 49 | "C": [["a", "b", "c"], "foo", [], ["d", "e", "f"]], |
| 50 | }, |
| 51 | index=list("abcd"), |
| 52 | ) |
| 53 | with pytest.raises(ValueError, match=error_message): |
| 54 | df.explode(input_subset) |
| 55 | |
| 56 | |
| 57 | @pytest.mark.parametrize( |