Skip to content

Unresolved reference when using Properties to access  #703

Open
@murfel

Description

@murfel

I'm trying to use Properties to access a column, and it throws "Unresolved reference: title". Here's my demo repo, branch demo.

I'm using Dataframe version "0.13.1", as suggested in the onboarding documentation, and movies.csv dataset.

package org.example

import org.jetbrains.kotlinx.dataframe.DataFrame
import org.jetbrains.kotlinx.dataframe.api.column
import org.jetbrains.kotlinx.dataframe.api.print
import org.jetbrains.kotlinx.dataframe.io.read

fun main() {
    val df = DataFrame.read("movies.csv")
    println(df.columnNames())  // [movieId, title, genres]

    // Properties - doesn't work "Unresolved reference: title"
//    df.title

    // Accessors - OK
    val title by column<String>()
    df[title].print()

    // Strings - OK
    df["title"].print()
}

(Following the getColumns doc page.)

It is extremely bizarre as the documentation shows the Properties tabs on almost every single page and yet doesn't mention if I need any extra imports or something else for it to work.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentation (not KDocs)questionFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions