PASTAplus / dex

Explore and subset CSV tables using associated EML metadata
Apache License 2.0
3 stars 0 forks source link

Represent datetimes as datetimes as long as they are "absolute times" #70

Closed rogerdahl closed 6 months ago

rogerdahl commented 8 months ago

This rolls back the changes in #66 (Represent incomplete dates (years, month, day of month) as integers), as those changes caused us to only be able to plot and subset complete datetimes. Instead, we now detect and allow "absolute times", which are datetimes that are one of the following combinations of elements:

- year
- year + month
- year + month + day
- year + month + day + hour
- year + month + day + hour + minute
- year + month + day + hour + minute + second

With optional microseconds and timezone elements.

Datetimes with the above parts are absolute points in time with increasing accuracy. All other combinations of date parts do not represent absolute points in time, and so cannot be represented meaningfully in Pandas, and are normally also less useful for plotting and subsetting.