cutoff_time.rename(columns={not_instance_id[0]: "time"}, inplace=True)
if cutoff_time["time"].dtype == object:
if (entityset.time_type == NumericTimeIndex and
cutoff_time["time"].dtype.name.find("int") == -1 and
cutoff_time["time"].dtype.name.find("float") == -1):
raise TypeError("cutoff_time times must be numeric: try casting via pd.to_numeric(cutoff_time["time"])")
elif (entityset.time_type == DatetimeTimeIndex and
cutoff_time["time"].dtype.name.find("time") == -1):
After Change
raise TypeError("cutoff_time times must be numeric: try casting "
"via pd.to_numeric(cutoff_time["time"])")
elif entityset.time_type == DatetimeTimeIndex:
if cutoff_time["time"].dtype.name not in PandasTypes._pandas_datetimes:
raise TypeError("cutoff_time times must be datetime type: try casting via pd.to_datetime(cutoff_time["time"])")
assert (cutoff_time[["instance_id", "time"]].duplicated().sum() == 0), \
"Duplicated rows in cutoff time dataframe."