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

Function test_chunked_array_to_pandas

python/pyarrow/tests/test_table.py:323–336  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

321
322@pytest.mark.pandas
323def test_chunked_array_to_pandas():
324 import pandas as pd
325
326 data = [
327 pa.array([-10, -5, 0, 5, 10])
328 ]
329 table = pa.table(data, names=['a'])
330 col = table.column(0)
331 assert isinstance(col, pa.ChunkedArray)
332 series = col.to_pandas()
333 assert isinstance(series, pd.Series)
334 assert series.shape == (5,)
335 assert series[0] == -10
336 assert series.name == 'a'
337
338
339@pytest.mark.pandas

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected