puffbird.FrameEngine.col_apply

FrameEngine.col_apply(func, col, new_col_name=None, assign_to_index=None, **kwargs)[source]

Apply a function to a specific column in each row in the table.

Parameters
funccallable

Function to apply. The function cannot return a Series object.

colstr

Name of “data column”.

new_col_namestr, optional

Name of computed new column. If None, this will be set to the name of the column; i.e. the name of the column will be overwritten. Defaults to None.

assign_to_indexbool, optional

Assign new column as “index column”, instead of as “data column”..

kwargsdict

Keyword Arguments passed each function call.

Returns
self