Skip to content

Commit e74f8ca

Browse files
committed
add inversion
1 parent 0bfe20b commit e74f8ca

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/series/test_explode.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,11 @@ def test_large():
5858
s = pd.Series([range(256)]).explode()
5959
result = s.explode()
6060
tm.assert_series_equal(result, s)
61+
62+
63+
def test_invert_array():
64+
df = pd.DataFrame({"a": pd.date_range("20190101", periods=3, tz="UTC")})
65+
66+
listify = df.apply(lambda x: x.array, axis=1)
67+
result = listify.explode()
68+
tm.assert_series_equal(result, df["a"].rename())

0 commit comments

Comments
 (0)