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:322–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

arrayMethod · 0.45
columnMethod · 0.45

Tested by

no test coverage detected