Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing of data frames in try-catch #2925

Closed
pdeffebach opened this issue Nov 3, 2021 · 2 comments
Closed

Printing of data frames in try-catch #2925

pdeffebach opened this issue Nov 3, 2021 · 2 comments
Labels
ecosystem Issues in DataFrames.jl ecosystem
Milestone

Comments

@pdeffebach
Copy link
Contributor

Motivated by this discourse post

julia> df = DataFrame(x = [1, 2]);

julia> try 
           length(df)
       catch e
           println(e)
       end
MethodError(length, (2×1 DataFrame
 Row │ x     
     │ Int64 
─────┼───────
   1 │     1
   2 │     2,), 0x00000000000073ca)

Do we need some sort of more compact printing of the data frame?

This doesn't seem to be any better with Vectors

julia> function foo(x::Int)
           1
       end;

julia> x = [1, 2, 3];

julia> try 
           foo(x)
       catch e
           println(e)
       end
MethodError(foo, ([1, 2, 3],), 0x00000000000073cb)

The same holds for display and show.

Perhaps we should file in Base?

@bkamins
Copy link
Member

bkamins commented Nov 3, 2021

I think it would be best to open an issue in Base. Could you please follow up on this? Thank you!

@bkamins bkamins added the ecosystem Issues in DataFrames.jl ecosystem label Nov 3, 2021
@bkamins bkamins added this to the 1.x milestone Nov 3, 2021
@bkamins
Copy link
Member

bkamins commented Nov 3, 2021

@pdeffebach - I guess given the comment by Jeff this can be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ecosystem Issues in DataFrames.jl ecosystem
Projects
None yet
Development

No branches or pull requests

2 participants