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

Empty DataFrame constructor should not output a TSFrame with 1 column #184

Open
chiraganand opened this issue Mar 21, 2024 · 0 comments
Open
Labels
bug Something isn't working

Comments

@chiraganand
Copy link
Member

chiraganand commented Mar 21, 2024

The current output is:

 julia> TSFrame(DataFrame([]))
 ERROR: BoundsError: attempt to access 0×0 DataFrame at index [!, 1]
 Stacktrace:
  [1] getindex
    @ ~/.julia/packages/DataFrames/MA4YO/src/dataframe/dataframe.jl:519 [inlined]
  [2] TSFrame(coredata::DataFrame, index::Int64; issorted::Bool, copycols::Bool)
    @ TSFrames ~/projects/TSFrames.jl/src/TSFrame.jl:324
  [3] TSFrame(table::DataFrame; issorted::Bool, copycols::Bool)
    @ TSFrames ~/projects/TSFrames.jl/src/TSFrame.jl:374
  [4] TSFrame(table::DataFrame)
    @ TSFrames ~/projects/TSFrames.jl/src/TSFrame.jl:367
  [5] top-level scope
    @ none:1

But, this should be 0x0 TSFrame with Int64 Index.

@chiraganand chiraganand added the bug Something isn't working label Mar 21, 2024
@chiraganand chiraganand changed the title Empty constructor should not output a TSFrame with 1 column Empty DataFrame constructor should not output a TSFrame with 1 column Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant