(df, schema=None)
| 5278 | # Here we simply ensure we validate correctly. |
| 5279 | |
| 5280 | def roundtrip(df, schema=None): |
| 5281 | tab = pa.Table.from_pandas(df, schema=schema) |
| 5282 | tab.validate(full=True) |
| 5283 | # we expect to trigger chunking internally |
| 5284 | # an assertion failure here may just mean this threshold has changed |
| 5285 | num_chunks = tab.column(0).num_chunks |
| 5286 | assert num_chunks > 1 |
| 5287 | tm.assert_frame_equal(tab.to_pandas(self_destruct=True, |
| 5288 | maps_as_pydicts="strict"), df) |
| 5289 | |
| 5290 | x = b"0" * 720000000 |
| 5291 | roundtrip(pd.DataFrame({"strings": [x, x, x]})) |
no test coverage detected