Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of: #1014
Fixes an issue where we can't print columns with a dtype like
{:list, {:struct, ...}}
where the root of the tree isn't a:struct
but it contains a:struct
. The cause is that we're not accounting for nested structs in our print function:explorer/lib/explorer/data_frame.ex
Lines 5982 to 5990 in 07f80fb
The solution is a recursive function.
I've also made some additional choices:
Before we were calling
inspect/1
. That resulted in e.g. strings getting""
delimiters. Strings don't usually get""
delimiters when printed in a dataframe.[]
delimiters.This is especially helpful in identifying empty lists and singleton lists. Before these cases were a bit confusing.
{}
delimiters instead of%{}
."x" =>
tox:
.nil
is now represented as the literalnil
instead of an empty string.Overall I found these choices looked much better. Here's just one example of the new format: