Table Of Contents

Search

Enter search terms or a module, class or function name.

pandas.DataFrame.transform

DataFrame.transform(func, *args, **kwargs)[source]

Call function producing a like-indexed NDFrame and return a NDFrame with the transformed values`

New in version 0.20.0.

Parameters:

func : callable, string, dictionary, or list of string/callables

To apply to column

Accepted Combinations are: - string function name - function - list of functions - dict of column names -> functions (or list of functions)

Returns:

transformed : NDFrame

Examples

>>> df.transform(lambda x: (x - x.mean()) / x.std())
Scroll To Top