Skip to content

Commit

Permalink
Removes list-type columns from data_options (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristineguadelupe authored Jan 2, 2024
1 parent 84c229d commit 2ad2f31
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/kino_explorer/data_transform_cell.ex
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,10 @@ defmodule KinoExplorer.DataTransformCell do
|> Code.eval_string(binding)
|> elem(0)

data_options = DataFrame.dtypes(df) |> normalize_dtypes()
data_options =
DataFrame.dtypes(df)
|> normalize_dtypes()
|> Map.reject(fn {_k, v} -> v == "list" end)

Map.put(operation, "data_options", data_options)
|> maybe_update_datalist(df)
Expand Down Expand Up @@ -964,6 +967,7 @@ defmodule KinoExplorer.DataTransformCell do
{k, {:u, 16}} -> {k, "integer"}
{k, {:u, 32}} -> {k, "integer"}
{k, {:u, 64}} -> {k, "integer"}
{k, {:list, _}} -> {k, "list"}
{k, v} -> {k, Atom.to_string(v)}
end)
|> Enum.into(%{})
Expand Down

0 comments on commit 2ad2f31

Please sign in to comment.