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

Pretty printing is unpretty inside DataFrame #281

Open
schlichtanders opened this issue Mar 8, 2024 · 1 comment
Open

Pretty printing is unpretty inside DataFrame #281

schlichtanders opened this issue Mar 8, 2024 · 1 comment

Comments

@schlichtanders
Copy link

schlichtanders commented Mar 8, 2024

using DataFrames, CSV, OnlineStats, Statistics
url = "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv"
df = DataFrame(CSV.File(download(url)))
combine(df, [:sepal_length, :sepal_width] .=> (a -> fit!(Mean(), a)))

shows the following output on the Julia REPL

1×2 DataFrame
 Row │ sepal_length_function              sepal_width_function              
     │ Mean…                              Mean…                             
─────┼──────────────────────────────────────────────────────────────────────
   1 │ Mean\e[90m: \e[39mn=150\e[90m |\…  Mean\e[90m: \e[39mn=150\e[90m |\…

Similar for other Monoids, like Extrema.

It would be great, if OnlineStats are readable inside a DataFrame (they are kind of useless without).

@joshday
Copy link
Owner

joshday commented May 21, 2024

I think the solution is to change show methods that rely on printstyled to use StyledStrings.jl

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

No branches or pull requests

2 participants