You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a data frame or a tsibble, if the date column contains hourly data that is a datetime object, nixtlar will transform said column to characters. However, dates of the form yyyy-mm-dd 00:00:00 are converted to yyyy-mm-dd. This generates an error.
Reproducible example
library(nixtlar)
nixtlar::nixtla_set_api_key("NIXTLA_API_KEY")
df<-nixtlar::electricitynixtlar::nixtla_client_forecast(df, h=8, id_col="unique_id") # this works fine df$ds<- as.POSIXct(df$ds, format="%Y-%m-%d %H:%M:%S") # this is the data type the user haddf#ds <- as.character(df$ds) # this is what `nixtlar` is doing in the background
head(df)
nixtlar::nixtla_client_forecast(df, h=8, id_col="unique_id) # this returns an error
The text was updated successfully, but these errors were encountered:
MMenchero
changed the title
Vanishing dates when specifying hour, minutes, and seconds
Hourly data vanishing when converted to character format
Jul 3, 2024
Description
A user reported the following issue:
When using a data frame or a
tsibble
, if the date column contains hourly data that is a datetime object,nixtlar
will transform said column to characters. However, dates of the formyyyy-mm-dd 00:00:00
are converted toyyyy-mm-dd
. This generates an error.Reproducible example
The text was updated successfully, but these errors were encountered: