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

goem_text - ValueError: The truth value of a DataFrame - python 3.8.3 #449

Closed
nicomy opened this issue Oct 20, 2020 · 1 comment
Closed
Labels

Comments

@nicomy
Copy link

nicomy commented Oct 20, 2020

Hello,
It seems that geom_text() in plotnine version '0.7.1' is not compatible with python 3.8.3.

In the function __init__ of the class geom_text:

if mapping
raise:
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

This two lines need to be updated :

        if mapping and 'hjust' in mapping:
            mapping['ha'] = mapping.pop('hjust')

        if mapping and 'vjust' in mapping:
            mapping['va'] = mapping.pop('vjust')

Ty for your work, plotnine is awesome :)

@has2k1
Copy link
Owner

has2k1 commented Oct 20, 2020

Use keyword arguments for data=*.

@has2k1 has2k1 added the bug label Oct 20, 2020
@has2k1 has2k1 closed this as completed in 7189c79 Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants