-
Notifications
You must be signed in to change notification settings - Fork 21
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
TypeError: Cannot compare Timestamp with datetime.date #7
Comments
ran into the same problem, convert datatime.date to Timestamp helps diff --git a/fake_star_detector/assets/simpler_model.py b/fake_star_detector/assets/simpler_model.py
index d782ff2..03035f6 100644
--- a/fake_star_detector/assets/simpler_model.py
+++ b/fake_star_detector/assets/simpler_model.py
@@ -203,7 +203,7 @@ def _validate_star(row: pd.DataFrame) -> int:
and (row["following"] < 2)
and (row["public_gists"] == 0)
and (row["public_repos"] < 5)
- and (row["created_at"] > datetime.date(2022, 1, 1))
+ and (row["created_at"] > pd.Timestamp(datetime.date(2022, 1, 1)))
and (row["email"] is None)
and (row["bio"] is None)
and (not row["blog"]) |
The Timestamp helped. Though, I had to make it time zone aware. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: