Skip to content

Commit

Permalink
Update _check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fkiraly committed Feb 8, 2024
1 parent 7347ac7 commit 11a93c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sktime/datatypes/_series/_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def check_pddataframe_series(obj, return_metadata=False, var_name="obj"):
# pd.DataFrame mtype allows object dtype,
# but if we allow object dtype with pd.Series entries,
# the mtype becomes ambiguous, i.e., non-delineable from nested_univ
if len(obj) > 0 and isinstance(obj.iloc[0, 0], (pd.Series, pd.DataFrame)):
if np.prod(obj.shape) > 0 and isinstance(obj.iloc[0, 0], (pd.Series, pd.DataFrame)):
msg = f"{var_name} cannot contain nested pd.Series or pd.DataFrame"
return ret(False, msg, None, return_metadata)

Expand Down

0 comments on commit 11a93c3

Please sign in to comment.