Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] allow object dtype-s in pandas based Table mtype-s #5651

Merged
merged 1 commit into from Dec 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions sktime/datatypes/_table/_check.py
Expand Up @@ -65,11 +65,6 @@ def check_pddataframe_table(obj, return_metadata=False, var_name="obj"):
if _req("has_nans", return_metadata):
metadata["has_nans"] = obj.isna().values.any()

# check that no dtype is object
if "object" in obj.dtypes.values:
msg = f"{var_name} should not have column of 'object' dtype"
return _ret(False, msg, None, return_metadata)

return _ret(True, None, metadata, return_metadata)


Expand All @@ -92,11 +87,6 @@ def check_pdseries_table(obj, return_metadata=False, var_name="obj"):
if _req("n_instances", return_metadata):
metadata["n_instances"] = len(index)

# check that dtype is not object
if "object" == obj.dtypes:
msg = f"{var_name} should not be of 'object' dtype"
return _ret(False, msg, None, return_metadata)

# check whether index is equally spaced or if there are any nans
# compute only if needed
if _req("has_nans", return_metadata):
Expand Down