Given what you've done elsewhere, how about...
```
try:
    import pandas
except ImportError:
    pandas = None

skip_pandas = unittest.skipIf(condition=pandas is None, ...)
```