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

How about make it available with dfply? #671

Open
guokai8 opened this issue Mar 9, 2020 · 0 comments
Open

How about make it available with dfply? #671

guokai8 opened this issue Mar 9, 2020 · 0 comments

Comments

@guokai8
Copy link

guokai8 commented Mar 9, 2020

Hi,
The ggplot is a nice package for python. However when I use dfply with the pipe function I can't make figure easily.

data = pd.DataFrame(
    {'col1':[1,1,1,1,1,2,2,2,2,2],
    'col2':[1,2,3,4,5,6,7,8,9,0],
     'col3':[-1,-2,-3,-4,-5,-6,-7,-8,-9,0]
    }
)
data >> group_by(X.col1) >> summarise(mean=X.col2.mean(),std=X.col3.std()) >> ggplot(aes(x='col1',y='mean'))+geom_bar()

it will report a error with

__init__() missing 1 required positional argument: 'data'

How about do something minor changes to make ggplot accept the pipe data ?

Kai

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant