First page Back Continue Last page Overview Image

pandas.Series.apply

Series.apply(func,

convert_dtype=True,

args=(),

**kwds)

The function "func" will be applied to the Series and it returns either a Series or a DataFrame, depending on "func".

Parameter

Meaning

func

a function, which can be a NumPy function that will be applied to the entire Series or a Python function that will be applied to every single value of the series

convert_dtype

A boolean value. If it is set to True (default), apply will try to find better dtype for elementwise function results. If False, leave as dtype=object

args

Positional arguments which will be passed to the function "func" additionally to the values from the series.

**kwds

Additional keyword arguments will be passed as keywords to the function