import functools


def skip_if_no_pandas(func):
    """ 
    Checks whether pandas is installed and skips the test if not
    """

    @functools.wraps(func)
    def wrapper(self, *args, **kwargs):
        try:

            return func(self, *args, **kwargs)
        except:
            return self.skipTest(f"Test '{func.__name__}' requires pandas")

    return wrapper