Open LostKobrakai opened 7 hours ago
First, you can use Explorer.DataFrame.print/2
which does accept a :limit
argument. That might get you what you need in the short term.
Second, I was gonna say I worry about a :limit
option for inspect because of how we currently format things. But we actually are smart enough to wrap longer columns across multiple lines. Example (see species
):
iex> Explorer.Datasets.iris
#Explorer.DataFrame<
Polars[150 x 5]
sepal_length f64 [5.1, 4.9, 4.7, 4.6, 5.0, ...]
sepal_width f64 [3.5, 3.0, 3.2, 3.1, 3.6, ...]
petal_length f64 [1.4, 1.4, 1.3, 1.5, 1.4, ...]
petal_width f64 [0.2, 0.2, 0.2, 0.2, 0.2, ...]
species string ["Iris-setosa", "Iris-setosa", "Iris-setosa", "Iris-setosa",
"Iris-setosa", ...]
>
So maybe a :limit
option is totally reasonable.
I happen to be in the middle of a bug bash that involves inspect
. I might cover this at some point while I'm in there.
The issue is the default value is too high. So we can’t respect it by default and then it is impossible for us to distinguish. Perhaps pointing to print
is the best option.
Yeah, unfortunate, but I agree that using the default 50 is not a good idea.
Inspecting dataframes always truncates the printed records without being affected of inspects
:limit
. While I can see why it's not following the default of50
, it would sometimes still be useful to see more than the currently hardcoded 5.