Mix.install([
{:kino_explorer, "~> 0.1.11"},
{:unzip, "~> 0.9.0"}
])
require Explorer.DataFrame, as: DF
[customers, orders, orders_items, products] =
for type <- [:customers, :orders, :orders_items, :products] do
"/home/kuku/5784/noahs-#{type}.csv"
|> DF.from_csv!()
end
co =
products
|> DF.filter(contains(desc, "Rug Cleaner"))
|> DF.join(orders_items)
|> DF.join(orders)
|> DF.filter(contains(ordered, "2017"))
|> DF.join(customers)
|> DF.filter(contains(name, "J") and contains(name, "P"))
|> then(& &1[:phone])
|> Explorer.Series.first()