diff --git a/xverse/transformer/_woe.py b/xverse/transformer/_woe.py index b13746b..396763a 100644 --- a/xverse/transformer/_woe.py +++ b/xverse/transformer/_woe.py @@ -110,7 +110,10 @@ def fit(self, X, y): #if the function is used as part of pipeline, then try to unpack tuple values #produced in the previous step. Added as a part of pipeline feature. try: - X, y = X + # If X is a DataFrame with 2 features, the assignment would succeed + # but not be as intended. + if not isinstance(X, pd.DataFrame): + X, y = X except: pass