llms.txt: machine-readable documentation index. Markdown version of this page is also available.

DataFrame Help

xs

Return cross-section from the DataFrame.

API reference: xs

Filters DataFrame by matching key values with key columns and removes key columns.

xs(vararg keyValues: Any?) [ { keyColumns } ]

When keyColumns are not specified, it takes the first n columns in depth-first order (looking inside ColumnGroup), where n is the number of given keyValues.

df.xs("Charlie", "Chaplin") df.xs("Moscow", true) { city and isHappy }
02 November 2026