Select columns
Edit page Last modified: 14 January 2025Two ways to create DataFrame
with a subset of columns:
indexing:
Properties
Accessors
Strings
df[df.age, df.weight]
val age by column<Int>()
val weight by column<Int?>()
df[age, weight]
df["age", "weight"]
selecting:
Properties
Accessors
Strings
df.select { age and weight }
val age by column<Int>()
val weight by column<Int?>()
df.select { age and weight }
df.select(age, weight)
df.select { "age" and "weight" }
df.select("age", "weight")
See column selectors