# Explorer.DataFrame.from\_csv problem

**URL:** <https://forum.elixirforum.com/t/explorer-dataframe-from-csv-problem/69321>\
**Category:** Questions\
**Tags:** csv, explorer\
**Created:** [February 10, 2025, 4:40am UTC](https://forum.elixirforum.com/t/explorer-dataframe-from-csv-problem/69321 "2025-02-10T04:40:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kevinschweikert](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kevinschweikert/32/26866_2.png) [@kevinschweikert](https://forum.elixirforum.com/u/kevinschweikert)\
**Post date:** [February 10, 2025, 1:35pm UTC](https://forum.elixirforum.com/t/explorer-dataframe-from-csv-problem/69321/2 "2025-02-10T13:35:08Z")

</div>

I think Explorer only supports NaiveDatetime. I made it work with this code in Livebook:

```elixir
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)

```

---

_[View the full topic](https://forum.elixirforum.com/t/explorer-dataframe-from-csv-problem/69321)._
