StratoDem / pandas-js

Pandas in JavaScript for data analysis and visualization
https://stratodem.github.io/pandas.js-docs
MIT License
458 stars 36 forks source link

apply a function to each series in a dataframe #50

Closed richardhundt closed 6 years ago

richardhundt commented 6 years ago

Hi there,

apply() and transform() seem to be missing, or I'm not looking hard enough. It seems like the most obvious and general thing I could want to do: apply a function to each row of my data, so I'm pretty sure I've just missed the api for that somehow. Any tips?

mritchie712 commented 6 years ago

Check out iterrows

richardhundt commented 6 years ago

thanks, not ideal, but that's probably a javascript limitation - in pandas I can df['foo'] = df.apply(func, axis=1) which is nice