Provides a wrapper for a DataFrame object that gives better control over how each column is displayed.
using Pkg
pkg"add https://github.com/GHTaarn/PrettyDataFrames.jl"
The only exported symbol is the PrettyDataFrame
type which wraps a
DataFrame object, e.g.
using DataFrames, PrettyDataFrames
x=PrettyDataFrame(DataFrame(a=rand(6), b=rand(6), c=1:6), :a => "%e", :b => "%9.1f")
filter!(:c => >(2), x.df)
display(x)
This would display the a
and b
columns using respectively the %e
and
%9.1f
Printf format
specifiers.
Uses the PrettyTables package and is based on Rafael Guerras post https://discourse.julialang.org/t/is-there-a-better-way-to-format-each-individual-columns-in-a-dataframe/111677/3