-
Notifications
You must be signed in to change notification settings - Fork 42
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
tableone.TableOne with categorical pandas DataFrame column raises TypeError #177
Comments
Apologies, thanks for flagging this!
It's a bug, I think caused by the introduction of the I'll fix it today or tomorrow, but for the meantime you may find that setting |
Thanks again @eroell. Should be fixed if you bump the version to 0.9.1: |
Thanks a lot for the fast resolve @tompollard! Confirm that bumping to 0.9.1 resolved this issue. |
Thanks! Feel free to raise issues if there are other bug fixes or features that you'd like to see. |
Hi,
with the new release 0.9.0 I run into the following issue when having a categorical column type in a pandas DataFrame:
raises
The same example works just fine when omitting
dummy_table["sex"] = dummy_table["sex"].astype("category")
, that is when the column type is "object".On Python 3.11.9, Info on Environment (pip list):
Did not yet dive into why this is the case... for tableone 0.8.0 this works. I have pandas 2.2.2 for both the working tableone 0.8.0 and the non-working tableone 0.9.0 setup.
Is this a bug or has this been made stricter input rule for a reason?
Best,
The text was updated successfully, but these errors were encountered: