Skip to content

Instantly share code, notes, and snippets.

@mfcabrera
Created November 24, 2020 17:00
Show Gist options
  • Save mfcabrera/28500c1d0e5f481cf9698c8998735930 to your computer and use it in GitHub Desktop.
Save mfcabrera/28500c1d0e5f481cf9698c8998735930 to your computer and use it in GitHub Desktop.
def apply_processors(processors, df, callback=None):
def _callback(processor, df):
if callback is None:
return
callback(processor, df)
for fn in processors:
df = fn(df)
_callback(fn, df)
return df.copy()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment