# Select columns

> For the complete documentation index, see [llms.txt](https://kotlin.github.io/dataframe/llms.txt).

Two ways to create [DataFrame](dataframe.html) with a subset of columns:

API reference: [select](https://kotlin.github.io/dataframe/api-docs/core/org.jetbrains.kotlinx.dataframe.api/select.html)

selecting:

Properties:

```KOTLIN
df.select { age and weight }
```

Strings:

```KOTLIN
df.select { "age" and "weight" }
df.select("age", "weight")
```

[Embedded content](resources/org.jetbrains.kotlinx.dataframe.samples.api.Access.select.html)

Related operations: [remove](remove.html)

See [column selectors](columnselectors.html)

indexing:

```KOTLIN
df["age", "weight"]
```

[Embedded content](resources/org.jetbrains.kotlinx.dataframe.samples.api.Access.getColumnsByName.html)

See [DataFrame indexing](indexing.html)

