Notes
Use .pipe when chaining together functions that expect Series, DataFrames or

In [14]:
import numpy as np
import pandas as pd

In [15]:
f(g(h(df), arg1=a), arg2=b, arg3=c)


You can write

In [16]:
(df.pipe(h)
.pipe(g, arg1=a)
.pipe(f, arg2=b, arg3=c)
)


If you have a function that takes the data as (say) the second argument, pass a tuple
indicating which keyword expects the data. For example, suppose f takes its data as arg2:

In [17]:
(df.pipe(h)
.pipe(g, arg1=a)
.pipe((f, 'arg2'), arg1=a, arg3=c)
)