Skip to content
This repository was archived by the owner on Jan 2, 2023. It is now read-only.
This repository was archived by the owner on Jan 2, 2023. It is now read-only.

Issues about this prototype #1

Open
@tk3369

Description

@tk3369

This prototype demonstrates how to implement AbstractDataFrame interface. The current implementation allows wrapping a data frame and possibly with additional data in the same struct. The idea came from this comment invenia/KeyedFrames.jl#19 (comment).

However, there are a number of unresolved caveats as documented below:

  1. I must define Base.getproperty (rather than forward) without running into trouble with the parent function
  2. I must define Base.setproperty! (rather than forward) to avoid method ambiguity.
  3. I must define Base.propertynames with private argument to make REPL completion work.
  4. I must define several Base.convert functions
  5. I must define findrows, findrow, manipulate, and SubDataFrame functions.

Issue 4 troubles me the most. For the Base.convert functions, they seems to be invoked during joins functions and eachcol. And it calls for converting between a regular DataFrame and my own type. If I have a type that contains more fields, there is no way to convert from a DataFrame without filling in dummy information as evident in this line of code (required for passing the test):

NDF(df::DataFrame) = NDF(df, "No name")

Issue 5 is also also quite troublesome because I have to extend some internal DataFrames.jl functions. I don't know why they do not take AbstractDataFrame type as argument e.g.
https://github.com/JuliaData/DataFrames.jl/blob/fb4e184f3b3997da8680668fbf7fcc789811eb18/src/dataframerow/utils.jl#L301-L305

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions