dfply icon indicating copy to clipboard operation
dfply copied to clipboard

Why do not we have mutate_at in the dfply?

Open ShaohongBai opened this issue 6 years ago • 1 comments

Why do not we have mutate_at in the dfply?

ShaohongBai avatar Feb 08 '19 23:02 ShaohongBai

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) )

thap2331 avatar May 07 '20 23:05 thap2331