Skip to content

Instantly share code, notes, and snippets.

@elena-roff
Created July 25, 2018 13:51
Show Gist options
  • Save elena-roff/e1ad0a6df0a69764ee66aa99d77ec993 to your computer and use it in GitHub Desktop.
Save elena-roff/e1ad0a6df0a69764ee66aa99d77ec993 to your computer and use it in GitHub Desktop.
import logging
logger = logging.getLogger(__name__)
def log_decorator(funk):
def wrapper(data, **kwargs):
before = data.shape[0]
data = funk(data, **kwargs)
after = data.shape[0]
logger.info("Excluded {} rows, remaining {}".format(before - after, after))
return data
return wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment