I believe that df.transform can perform arbitrary functions. For example df.transform(lambda x: x + 10) etc.
However, a simple math.ceil() gives me an error. This can be solved with np.ceil(), but why is there an error in df.transform, which should be able to execute arbitrary functions?
import math
import numpy as np
import pandas as pd
df = pd.DataFrame({'V':[1, 1.5, 2]})
df.transform(lambda x: x + 10) #OK
df.transform(lambda x: np.ceil(x)) #OK
df.transform(lambda x: math.ceil(x))
TypeError: cannot convert the series to <class 'float'> #NG. Why?