From a8fbfc7bfcaadc71389a81c7c64076f643f4939e Mon Sep 17 00:00:00 2001 From: Patrick Deziel <42919891+pdeziel@users.noreply.github.com> Date: Wed, 8 Nov 2023 08:57:41 -0600 Subject: [PATCH] Add DataFrame guard (#90) --- pyensign/ml/dataframe.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyensign/ml/dataframe.py b/pyensign/ml/dataframe.py index f3d86e4..6904b2a 100644 --- a/pyensign/ml/dataframe.py +++ b/pyensign/ml/dataframe.py @@ -1,6 +1,10 @@ from enum import Enum -import pandas as pd +try: + import pandas as pd +except ImportError: + pd = None + raise ImportError("please `pip install pyensign[ml]` to use PyEnsign DataFrames") class DataFrame(pd.DataFrame):