How do I query for a date in a mongodb document that has been opened in pandas?
Could someone refer me to an concise resource on handling datetime values from mongodb in python and pandas? There are confusing issues here that I am slowly figuring out.
WhatI have learned:
Mongodb dates are milliseconds since epoch, a 64-bit integer value.
Python datetime is seconds since epoch, a float value. in python datetime, milliseconds appear after a decimal point
convert mongodb date to python date: mongodbDate / 1000 = pythonDate
timezones are handled in the application layer (which means me)
So when a mongodb document is read into a pandas dataframe, how is a date queried?
For example, select (iloc) data with a date of ‘2023-03-01’?
Apologies for what is no doubt a dumb question. The diversity of standards in managing datetimes creates challenges that are difficult to reason through.