diff --git a/src/TimeDataFrames.jl b/src/TimeDataFrames.jl index 68160b18a7db23f78d6e635e0a6d85a2df3fbd7e..07301a5c3bc6137ddf2cb404e53a4aeaf5580522 100644 --- a/src/TimeDataFrames.jl +++ b/src/TimeDataFrames.jl @@ -4,6 +4,8 @@ using CSV using DataFrames using ExtendedDates +import Base: show + export TimeDataFrame, innerjoin, outerjoin mutable struct TimeDataFrame @@ -338,4 +340,14 @@ function outerjoin(d1::TimeDataFrame, d2::TimeDataFrame) return TimeDataFrame(sort!(DataFrames.outerjoin(data1, data2, on=:Column1),1), union(periods1, periods2), true) end +function Base.show(io::IO, tdf::TimeDataFrame) + df = getfield(tdf, :data) + dfcopy = copy(df) + periods = getfield(tdf, :periods) + insertcols!(dfcopy, 1, :Periods => periods) + show(io, dfcopy, show_row_number = false, eltypes = false) +end + +Base.show(tdf::TimeDataFrame) = show(stdout, tdf) + end # module