Closed
Description
I tested it with danfojs-node and danfojs-node-nightly, because danfo.Dt includes the nightly.
What I have so far is this. Not a dt or danfo.toDateTime() operation yet.
const danfo = require("danfojs-node-nightly");
let index = ["0", "1", "2", "3"];
let value = [
"2018-11-30T20:59:00",
"2018-10-30T20:59:00",
"2018-09-30T20:59:00",
"2018-08-30T20:59:00",
];
let sf = new danfo.Series(value, { index });
console.log(sf.dt);
This is working and gives this. Danfo succesfully recognizes this string as a date.
TimeSeries {
'$dateObjectArray': [
2018-11-30T20:59:00.000Z,
2018-10-30T20:59:00.000Z,
2018-09-30T20:59:00.000Z,
2018-08-30T20:59:00.000Z
]
}
But if I have a DataFrame where one column are dates then it is not possible to insert it into the DataFrame.
Any single one of these functions results in the same error. Obviously only for demonstration all 4 in a row.
df["dates"] = df["dates"].dt
df["dates"] = danfo.toDateTime(dt["dates"])
let test_df = new danfo.DataFrame(sf.dt);
let test_sf = new danfo.Series(sf.dt);
Error: File format not supported!