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

Accessors? #127

Open
elect86 opened this issue Sep 10, 2021 · 3 comments
Open

Accessors? #127

elect86 opened this issue Sep 10, 2021 · 3 comments

Comments

@elect86
Copy link

elect86 commented Sep 10, 2021

Hello,

what about generating accessors?

@holgerbrandl
Copy link
Owner

That's not possible. Kotlin is a statically compiled language. We can not anticipate what columns will be contained in a csv, so it's not possible to create corresponding accessors.

In the jupyter context it's a slightly different situation because there the current state can be used to mess with class definitions at runtime in the next cell.

@elect86
Copy link
Author

elect86 commented Sep 11, 2021

What about inferring it manually?

Kind of like this (or json):

@DataSchema
interface Person {
    val name: String
    val age: Int 
}

@holgerbrandl
Copy link
Owner

This would need to be bound via a generic type to DataFrame I guess. However, it's not clear to me how this would then provide a better API. Ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants