(version)
| 750 | |
| 751 | @pytest.mark.pandas |
| 752 | def test_read_column_selection(version): |
| 753 | # ARROW-8641 |
| 754 | df = pd.DataFrame(np.arange(12).reshape(4, 3), columns=['a', 'b', 'c']) |
| 755 | |
| 756 | # select columns as string names or integer indices |
| 757 | _check_pandas_roundtrip( |
| 758 | df, columns=['a', 'c'], expected=df[['a', 'c']], version=version) |
| 759 | _check_pandas_roundtrip( |
| 760 | df, columns=[0, 2], expected=df[['a', 'c']], version=version) |
| 761 | |
| 762 | # different order is followed |
| 763 | _check_pandas_roundtrip( |
| 764 | df, columns=['b', 'a'], expected=df[['b', 'a']], version=version) |
| 765 | _check_pandas_roundtrip( |
| 766 | df, columns=[1, 0], expected=df[['b', 'a']], version=version) |
| 767 | |
| 768 | |
| 769 | def test_read_column_duplicated_selection(tempdir, version): |
nothing calls this directly
no test coverage detected