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

Function test_array_to_pandas

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

Source from the content-addressed store, hash-verified

4577
4578
4579def test_array_to_pandas():
4580 for arr in [pd.period_range("2012-01-01", periods=3, freq="D").array,
4581 pd.interval_range(1, 4).array]:
4582 result = pa.array(arr).to_pandas()
4583 expected = pd.Series(arr)
4584 tm.assert_series_equal(result, expected)
4585
4586 result = pa.table({"col": arr})["col"].to_pandas()
4587 expected = pd.Series(arr, name="col")
4588 tm.assert_series_equal(result, expected)
4589
4590
4591def test_roundtrip_empty_table_with_extension_dtype_index():

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected