apply() (Pandas)

apply() runs a function along an axis of a DataFrame or over every element of a Series. It is the flexible escape hatch for transformations that don't have a…