Skip to content

Commit

Permalink
add monkey patch to work around JuliaData/DataFrames.jl#2689
Browse files Browse the repository at this point in the history
  • Loading branch information
jrevels committed Mar 31, 2021
1 parent 1b7dce5 commit 6b0afc0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/tour.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@

using Onda, TimeSpans, DataFrames, Dates, UUIDs, Test, ConstructionBase, Arrow

#####
##### Ignore this; it's just a hacky monkey patch for https://github.com/JuliaData/DataFrames.jl/issues/2689
#####

DataFrames.fromcolumns(x::Tables.CopiedColumns, names; copycols::Bool=true) = invoke(DataFrames.fromcolumns, Tuple{Any,Any}, x, names; copycols)
DataFrames.DataFrame(x::Tables.CopiedColumns; copycols::Bool=false) = DataFrame(Tables.source(x); copycols=copycols)

#####
##### generate some mock data
#####
Expand Down Expand Up @@ -87,6 +94,7 @@ path_to_annotations_file = joinpath(root, "test.onda.annotations.arrow")
write_annotations(path_to_annotations_file, annotations)
Onda.log("wrote out $path_to_annotations_file")


#####
##### basic Onda + DataFrames patterns
#####
Expand Down

0 comments on commit 6b0afc0

Please sign in to comment.