Closed caiusno1 closed 1 year ago
Interesting. It seems the same problem arises when using 'Q'
as the column/variable name. Only an issue when they are capitalized (basically 'Q'
and 'C'
are off-limits because they are used in that patsy formula).
Doesn't seem like a big deal since it's such an easy solution (i.e., just change the column name), but I agree it seems reasonable to provide a custom error message that tells the user what's going on, since this is kind of an overwhelming error message. Maybe an assertion check on the input.
Agreed. We should add the error message at two places in the code:
Does either one of you want to submit a PR for this?
Thanks, Raphael
The following code crashes with a not understandable error message:
Trace
It seems like the error is caused by the usage of the variablename "C" in the dataframe which can be traced back to patsy (https://github.com/pydata/patsy/issues/174). Also when the error is caused by patsy it would be nice if the user can be warned to not use C as a variable name.