The apply() Method
Learn about the apply() method in detail.
We'll cover the following...
Like the series, the DataFrame has an apply
method. As with Series,
we should be wary of using the apply
method in DataFrames. More specifically, if we’re dealing with numbers, we might want to see if we can operate in a vectorized way.
Also, keep in mind that a DataFrame is two-dimensional. So rather than applying a function to a single value, when we call apply
on a DataFrame, we work on a whole row ...