()
| 2627 | |
| 2628 | @pytest.mark.pandas |
| 2629 | def test_pandas_null_sentinels_index(): |
| 2630 | # ARROW-7023 - ensure that when passing a pandas Index, "from_pandas" |
| 2631 | # semantics are used |
| 2632 | import pandas as pd |
| 2633 | idx = pd.Index([1, 2, np.nan], dtype=object) |
| 2634 | result = pa.array(idx) |
| 2635 | expected = pa.array([1, 2, np.nan], from_pandas=True) |
| 2636 | assert result.equals(expected) |
| 2637 | |
| 2638 | |
| 2639 | @pytest.mark.numpy |