I have a number of long lists of DateObject
s paired with values.
An example data element looks like this:
It takes several hours of processing time to generate these lists and as I can reuse them, I want to save them so I can Import
them as needed rather than recalculating them.
I tried exporting the data lists:
Export[".../Index model/sp.CSV", sp,"CSV"];
Upon then:
Import[".../Index model/sp.CSV","CSV"]
I get elements that look like the following:
{"DateObject[{1977, 2, 15, 0, 0, 0.}, \"Instant\", \"Gregorian\", \
-5.]", 101.04}
Which does not give me an immediately computable DateObject
.
I appreciate that I can derive a DateObject
from this imported data, but that defeats some of the purpose in exporting the data in the first place.
Does someway exist so I can Export
DateObject
s that stay DateObject
s on Import
?
ToExpression
can restore it after import. $\endgroup$