I think Explorer only supports NaiveDatetime. I made it work with this code in Livebook:
tmp_dir = System.tmp_dir!()
test_csv_path = Path.join(tmp_dir, "test.csv")
File.write!(test_csv_path,
"""
datetime_ns
1738573413286629810
""")
df = Explorer.DataFrame.from_csv!(test_csv_path, [
infer_schema_length: 0,
columns: [
"datetime_ns"
],
dtypes: [
datetime_ns: {:u, 64}
]
])
dt = df["datetime_ns"]
|> Explorer.Series.transform(fn dns -> DateTime.from_unix!(dns, :nanosecond) end)
Explorer.DataFrame.put(df, "datetime_ns", dt)


















