xKDR / TSFrames.jl

Timeseries in Julia
MIT License
92 stars 22 forks source link

Support for empty TimeFrame constructor #118

Closed harsharora21 closed 1 year ago

harsharora21 commented 1 year ago

This PR kind of fixes issue #67. Now you can create empty TimeFrame using TimeFrame(indextype,n=col) where indextype is type of index and col is no of columns.

julia> TimeFrame(Int,n=3)
0×3 TimeFrame with Int64 Index
 Index  x1   x2   x3  
 Int64  Any  Any  Any 
──────────────────────
julia> TimeFrame(Date,n=3)
0×3 TimeFrame with Date Index
 Index  x1   x2   x3  
 Date   Any  Any  Any 
──────────────────────
codecov-commenter commented 1 year ago

Codecov Report

Merging #118 (656c17d) into main (d476907) will increase coverage by 0.14%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #118      +/-   ##
==========================================
+ Coverage   89.37%   89.51%   +0.14%     
==========================================
  Files          19       19              
  Lines         367      372       +5     
==========================================
+ Hits          328      333       +5     
  Misses         39       39              
Impacted Files Coverage Δ
src/TSFrame.jl 95.55% <100.00%> (+0.55%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

chiraganand commented 1 year ago

@harsharora21 Can you change the constructor name based on changes in #119? Otherwise everything looks okay.