Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible future mixup #22

Open
TalShor opened this issue Feb 15, 2024 · 0 comments
Open

Possible future mixup #22

TalShor opened this issue Feb 15, 2024 · 0 comments

Comments

@TalShor
Copy link

TalShor commented Feb 15, 2024

when doing cat_column.cat.codes you get the codes of the categories.
the problem - is that it's pandas categories and not ours.
e.g.
psychological_and_social_health / health_mental_past_psychiatrist -
health_mental_past_psychiatrist
No 14317
Yes 2407
Prefer not to answer 93
Do not know 35

with preferred_language='coding' it's
health_mental_past_psychiatrist
0 14317
1 2407
-3 93
-1 35

but with .cat.codes we get
1 14317
3 2407
-1 138
2 93
0 35

preferred_language is working - but this might cause people to create some mistakes. fixing it is non-trivial since you can't control the pandas coding scheme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant