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

Don't use date in date_of_acquisition #17

Open
bagibence opened this issue Oct 25, 2018 · 2 comments
Open

Don't use date in date_of_acquisition #17

bagibence opened this issue Oct 25, 2018 · 2 comments

Comments

@bagibence
Copy link

We should use timestamp if we are inserting more than once a day.
I guess the problem is here for example:

df_daily.date_of_acquisition = df_daily.date_of_acquisition.apply(lambda x: datetime.datetime.strptime(str(x), '%Y%m%d%H').date())

df.date_of_acquisition = df.date_of_acquisition.apply(lambda x: datetime.datetime.strptime(x, '%Y%m%d%H').date())

We have to check where else it exists.

@vrgsdaniel
Copy link
Collaborator

we better agree on use timestamp always for consistency. Is the DB ok with that?

@bagibence
Copy link
Author

It is. You use it for hourlyprediction already.

db.HourlyPrediction.select().first().date_of_acquisition returns
datetime.datetime(2018, 6, 19, 10, 0)

But only use it for the date_of_acquisition. The date_for_which_weather_is_predicted field should stay datetime.datetime.date for dailyprediction as it refers to a whole day.

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