(self)
| 3137 | _check_pandas_roundtrip(df) |
| 3138 | |
| 3139 | def test_category_zero_chunks(self): |
| 3140 | # ARROW-5952 |
| 3141 | for pa_type, dtype in [(pa.string(), 'object'), (pa.int64(), 'int64')]: |
| 3142 | a = pa.chunked_array([], pa.dictionary(pa.int8(), pa_type)) |
| 3143 | result = a.to_pandas() |
| 3144 | expected = pd.Categorical([], categories=np.array([], dtype=dtype)) |
| 3145 | tm.assert_series_equal(pd.Series(result), pd.Series(expected)) |
| 3146 | |
| 3147 | table = pa.table({'a': a}) |
| 3148 | result = table.to_pandas() |
| 3149 | expected = pd.DataFrame({'a': expected}) |
| 3150 | tm.assert_frame_equal(result, expected) |
| 3151 | |
| 3152 | @pytest.mark.parametrize( |
| 3153 | "data,error_type", |
nothing calls this directly
no test coverage detected