()
| 4577 | |
| 4578 | |
| 4579 | def 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 | |
| 4591 | def test_roundtrip_empty_table_with_extension_dtype_index(): |