-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
columns comparison with Enum column name triggers TypeError #22551
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
Comments
Hmm is there any reason why you wouldn't just use the |
My motivation is the same with using |
I have the same problem, and would also prefer not to use the .name-property to ensure specificity of the key. Or rather: If the reason for this error is an unintended effect of a change in 0.22 to 0.23, what would speak against restoring the original behavior? |
Same issue: https://stackoverflow.com/q/55822555/1240268 |
I get a similar issue but I am not indexing at all the dataframe or the series, just comparing it
|
Looks to work on master. Could use a test
|
Hey! I am a first-time contributor and would like to help on this. My experience with tests is pretty non-existant, so as far as I understand it one should convert the code-example to a function, and then add this to the appropriate pandas/test suite (maybe to pandas/test/dtypes)? |
* TST * TST * TST * updated strign formatting * updated formatting * updating the test place within files * removing an additional parentheses * removing the buggy file that was pushed * removing the buggy file that was pushed * fixing initial file * fixing order of import * fixing space * fixing space * fixing space * series * series * series * series * syntax
Code Sample, a copy-pastable example if possible
Problem description
On pandas 0.23.x, comparison of columns in DataFrames which have enum.Enum column names triggers off a TypeError exception. it looks that pandas calls user defined Enum class as a function.
Expected Output
just print
True
. Pandas 0.22.0 does the expected behavior. Pandas 0.23.0 and later has this problem.Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: