visualize_decoratorssubsequent_calls_per_line

subsequent_calls_per_line

visualize._decorators.subsequent_calls_per_line(plotfun)

Call a function on each row of a dataframe separately.

Useful for plotfunctions that are designed to operate on pandas.Series instances, rather than on pandas.DataFrame instances. Also useful for parallelizing plotting functions.

The first input argument (i.e. args[0]) is assumed to be an pd.DataFrame instance.

If the first n args are of type pandas.DataFrame, each frame will be iterated as described above. In this case, it is assumed that all n DataFrames have the same indexes.

Parameters:

plotfun – The function to decorate.

Returns:

a function that calls plotfun on each row of the DataFrame(s).

Return type:

Callable