We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d997c70 commit 7951ea5Copy full SHA for 7951ea5
python/tests/test_dataframe.py
@@ -1582,6 +1582,18 @@ def test_empty_to_arrow_table(df):
1582
assert set(pyarrow_table.column_names) == {"a", "b", "c"}
1583
1584
1585
+def test_iter_batches_dataframe(fail_collect):
1586
+ ctx = SessionContext()
1587
+
1588
+ batch1 = pa.record_batch([pa.array([1])], names=["a"])
1589
+ batch2 = pa.record_batch([pa.array([2])], names=["a"])
1590
+ df = ctx.create_dataframe([[batch1], [batch2]])
1591
1592
+ expected = [batch1, batch2]
1593
+ for got, exp in zip(df, expected):
1594
+ assert got.equals(exp)
1595
1596
1597
def test_arrow_c_stream_to_table(fail_collect):
1598
ctx = SessionContext()
1599
0 commit comments