kieferk / dfply

dplyr-style piping operations for pandas dataframes
GNU General Public License v3.0
890 stars 103 forks source link

Why do not we have mutate_at in the dfply? #83

Open ShaohongBai opened 5 years ago

ShaohongBai commented 5 years ago

Why do not we have mutate_at in the dfply?

thap2331 commented 4 years ago

Hey is mutate function working for you? I cannot get mutate work. here is an example and mutate is not working. It says ---'function' object has no attribute 'mul'---:

from gapminder import gapminder from dfply import *

(gapminder >> mask(X.year==2002) >> select(~X.lifeExp) >> rename(gdp_per_cap='gdpPercap') >> rename(Year=X.year) >> mutate(GDP=X.pop * X.gdp_per_cap) )