We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ply_select
With dplyr, I often find myself using mutate to calculate a item-level value using a grouped aggregate. For example:
mutate
flights %>% group_by(year) %>% mutate(mean_delay = mean(arr_delay), std_delay = sd(arr_delay), z_delay = (arr_delay - mean_delay)/std_delay)
From the docs, I thought that the first step of the pandas-ply equivalent would be:
(flights .groupby('year') .ply_select('*', mean_delay = X.arr_delay.mean(), std_delay = X.arr_delay.std()) )
But when I try this I get the following error:
Traceback (most recent call last): File "<pyshell#17>", line 5, in <module> sd = X.arr_delay.std())) TypeError: _ply_select_for_groups() takes exactly 1 argument (4 given)
The problem appears to be the '*' argument not working when ply_select operates on a group.
'*'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
With dplyr, I often find myself using
mutate
to calculate a item-level value using a grouped aggregate. For example:From the docs, I thought that the first step of the pandas-ply equivalent would be:
But when I try this I get the following error:
The problem appears to be the
'*'
argument not working whenply_select
operates on a group.The text was updated successfully, but these errors were encountered: