MCPcopy Create free account
hub / github.com/apache/arrow / test_recordbatch_from_to_pandas

Function test_recordbatch_from_to_pandas

python/pyarrow/tests/test_pandas.py:3779–3790  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3777
3778
3779def test_recordbatch_from_to_pandas():
3780 data = pd.DataFrame({
3781 'c1': np.array([1, 2, 3, 4, 5], dtype='int64'),
3782 'c2': np.array([1, 2, 3, 4, 5], dtype='uint32'),
3783 'c3': np.random.randn(5),
3784 'c4': ['foo', 'bar', None, 'baz', 'qux'],
3785 'c5': [False, True, False, True, False]
3786 })
3787
3788 batch = pa.RecordBatch.from_pandas(data)
3789 result = batch.to_pandas()
3790 tm.assert_frame_equal(data, result)
3791
3792
3793def test_recordbatchlist_to_pandas():

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected