DataFrame.apply
Apply a function to each element or along a specified axis of a DataFrame.
danfo.DataFrame.apply(callable, options)
Parameters
Type
Description
Default
callable
Function
Function to apply to each column or row
options
Object
axis: 0 or 1. If 0, compute the power column-wise, if 1, row-wise
{axis: 1}
Examples
Apply a function along default axis 1 (columns)
Note that the specified function passed to apply
will be called with an array of the values across the specified axis.
Apply a function along axis 0 (row)
Last updated
Was this helpful?