tableone icon indicating copy to clipboard operation
tableone copied to clipboard

Problem - The truth value of an array with more than one elemnet is ambigous.

Open filipy1 opened this issue 2 months ago • 3 comments

Hello appreciate the hard work and found the package really useful, recently thought i came across a problem I think might be some bug or functionality i cannot understand?

I follow the basic idea of creating a data set and a list of the categorical columns and providing that to the TableOne function without any additional conditions and I get the error message provided below, ill really appreciate if someone can clarify if its a bug or something on my side of things.

attached are snippets of the df, code and error

Screenshot 2024-05-06 at 14 52 33

Screenshot 2024-05-06 at 14 53 15

Screenshot 2024-05-06 at 14 52 54

filipy1 avatar May 06 '24 11:05 filipy1

I'll add that this error pops up when I try to use a categorical list of columns, when I do not use it i get another error

Screenshot 2024-05-06 at 15 27 29

The way I somewhat managed to bypass the problem is by exporting my df to excel and importing it back to python and suddenly the error didn't occur

filipy1 avatar May 06 '24 12:05 filipy1