I am formatting the original timestamps in my MongoDB documents. The original ones look like this:
"timestamp" : ISODate("2013-03-06T17:10:29Z")
And the formatted ones (Used as _id of the documents after using aggregation):
"_id" : "06-03-13T17:10"
I then want to plot the "amount" (y axis) values against the "_id" values (x axis)
I am having trouble formatting the _id so that I can plot it.
amount = [book["price"] for book in sorted["result"]]
time = [book["_id"] for book in sorted["result"]]
P.plot(amount, time)
P.show()
Returns:
ValueError: invalid literal for float(): 06-03-13T15:36