SDV
SDV copied to clipboard
PAR Model cannot fit columns with dtype `period`
Hi All,
I have having a bit trouble with the time series generation module.
It looks to be an issue with the index but I'm not sure how to resolve it. Best, Andrew
Hi @andrewcz, there is an ongoing bug where the PAR
model is crashing if the sequence index is anything other than a datetime. You can follow along in #808 for updates as we get to a resolution.
Due to this, I believe the error is caused by the following line:
DF.index = DF.index.to_period('M')
This is changing the column's data type from datetime to period.
Workaround: Is it possible for you to keep it as datetime (ie remove this line)? Verify that you have the supported data types by running the following line:
DF.dtypes
This will provide a list of column names and their dtypes. Make sure you see datetime
and not period
.
Quick update: Seems like this error is occurring during the fit
, not the sample
. There is a similar issue on this in #465, but the error is different. Let's keep this issue open as a separate bug, as the root cause seems different.