(version)
| 466 | |
| 467 | @pytest.mark.pandas |
| 468 | def test_category(version): |
| 469 | repeats = 1000 |
| 470 | values = ['foo', None, 'bar', 'qux', np.nan] |
| 471 | df = pd.DataFrame({'strings': values * repeats}) |
| 472 | df['strings'] = df['strings'].astype('category') |
| 473 | |
| 474 | values = ['foo', None, 'bar', 'qux', None] |
| 475 | expected = pd.DataFrame({'strings': pd.Categorical(values * repeats)}) |
| 476 | _check_pandas_roundtrip(df, expected, version=version) |
| 477 | |
| 478 | |
| 479 | @pytest.mark.pandas |
nothing calls this directly
no test coverage detected