Top "Apply" questions

A function to call another function with a list of arguments.

Why does as.factor return a character when used inside apply?

I want to convert variables into factors using apply(): a <- data.frame(x1 = rnorm(100), x2 = sample(c("a","…

r apply r-factor
pandas apply typeError: 'float' object is not subscriptable

I have a dataframe df_tr like this: item_id target target_sum target_count 0 0 0 1 50 1 0 0 1 50 I'm trying to find the …

python pandas apply series array-broadcasting
Including the group name in the apply function pandas python

Is there away to specify to the groupby() call to use the group name in the apply() lambda function? Similar …

python pandas pandas-groupby apply
How to read in multiple data tables into R using apply function?

I am relatively new to R and I'm having a problem reading in multiple tables from a directory using an …

r apply lapply read.table
weighted means by group and column

I wish to obtain weighted means by group for each of several (actually about 60) columns. This question is very similar …

r for-loop apply sapply
Parallelize pandas apply

New to pandas, I already want to parallelize a row-wise apply operation. So far I found Parallelize apply after pandas …

python pandas parallel-processing apply embarrassingly-parallel