Repository navigation
Commit ab9ee88
Shashwati
PYTHON: Fix pandas Categorical deprecation warnings in tests (GH-49255)
Replace pd.Categorical() calls that specify categories containing
values not in the categories list with the recommended pattern:
create the Categorical first, then use .set_categories() to restrict.
Fixes deprecation warnings:
- test_category: cat_strings_with_na
- test_category_implicit_from_pandas: two Categorical instances
Fixes #492551 parent 68d1368 commit ab9ee88
1 file changed
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3069 | 3069 | | |
3070 | 3070 | | |
3071 | 3071 | | |
| 3072 | + | |
| 3073 | + | |
| 3074 | + | |
| 3075 | + | |
| 3076 | + | |
| 3077 | + | |
| 3078 | + | |
3072 | 3079 | | |
3073 | | - | |
3074 | | - | |
3075 | | - | |
| 3080 | + | |
| 3081 | + | |
3076 | 3082 | | |
3077 | 3083 | | |
3078 | | - | |
3079 | | - | |
3080 | | - | |
| 3084 | + | |
3081 | 3085 | | |
3082 | 3086 | | |
3083 | 3087 | | |
| |||
3096 | 3100 | | |
3097 | 3101 | | |
3098 | 3102 | | |
| 3103 | + | |
3099 | 3104 | | |
3100 | | - | |
3101 | | - | |
3102 | | - | |
| 3105 | + | |
| 3106 | + | |
3103 | 3107 | | |
3104 | 3108 | | |
3105 | 3109 | | |
| |||
0 commit comments