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

Issue with Timestamp Comparison in dt_transform #1223

Open
mfquintero opened this issue Feb 18, 2025 · 1 comment
Open

Issue with Timestamp Comparison in dt_transform #1223

mfquintero opened this issue Feb 18, 2025 · 1 comment

Comments

@mfquintero
Copy link

I'm getting an issue running robynpy since the current implementation converts the dates to a formatted string (YYYY-MM-DD) using dt.strftime() in the _prepare_data method of the FeatureEngineering class, which results in dt_transform["ds"] being of type string. This causes issues when comparing dt_transform["ds"] with the window_start in the _create_rolling_window_data method of the same class.

@rora00
Copy link

rora00 commented Mar 4, 2025

Where do you see the implementation of dt.strftime in the FeatureEngineering class? It looks like the implementation in the current version of RobynPy 0.1.2 uses pd.to_datetime() to convert the date column from str to datetime so that "ds" can be compared with "window_start" and "window_end". The tutorial notebook uses a dataset in the format you specified of (YYYY-MM-DD) as a str which gets converted successfully to a datetime object which then gets used in the feature engineering step.

Could you provide an example of the date column in your dataset which may be causing a potential faulty datetime conversion to an object instead of datetime? Potentially the limitation of pd.to_datetime itself is that it does not handle two scenarios: (1) Where dates fall outside of the permitted range or (2) Have a mix between timezone naive and aware datetimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants