elixir-explorer / explorer

Series (one-dimensional) and dataframes (two-dimensional) for fast and elegant data exploration in Elixir
https://hexdocs.pm/explorer
MIT License
1.12k stars 123 forks source link

Accessing a DataFrame with an out of bounds range should raise #1005

Open billylanchantin opened 1 month ago

billylanchantin commented 1 month ago

Today if a range extends past the end of a DataFrame, we filter those columns out.

df = Explorer.DataFrame.new(a: [1, 2, 3])
df[1..1]
# #Explorer.DataFrame<
#   Polars[0 x 0]
# >

Per the discussion here, we think we should raise instead.