eike-welk / clair

Collect prices on E-Commerce sites, and display them in graphical form.
GNU General Public License v3.0
0 stars 0 forks source link

Use `pd.Timestamp` for parsing and representing points in time. #45

Closed eike-welk closed 7 years ago

eike-welk commented 11 years ago

Currently times are represented by datetime.datetime objects; while parsing string representations of times is done with the library dateutil. However Pandas converts datetime.datetime to pd.Timestamp, and represents times internally as integers. Furthermore pd.Timestamp can automatically and comfortably parse string representations of times.

Therefore port all date computations to pd.Timestamp.

Empty series should be filled with NaN or numpy.datetime64('NaT'), not with None.

http://pandas.pydata.org/pandas-docs/dev/missing_data.html#datetimes

http://docs.scipy.org/doc/numpy-dev/reference/arrays.datetime.html

and discussion at end:

https://github.com/pydata/pandas/issues/3593#issuecomment-17850876

eike-welk commented 7 years ago

Done. Times are now repesented as series of Datetime64 objects. Dates from Ebay are parsed by pd.Timestamp.