janitor.then(df: pandas.core.frame.DataFrame, func: Callable) → pandas.core.frame.DataFrame[source]

Add an arbitrary function to run in the pyjanitor method chain.

This method does not mutate the original DataFrame.

  • df – A pandas dataframe.

  • func – A function you would like to run in the method chain. It should take one parameter and return one parameter, each being the DataFrame object. After that, do whatever you want in the middle. Go crazy.


A pandas DataFrame.