janitor.then

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.

Parameters
  • 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.

Returns

A pandas DataFrame.