XsDocs
The Xs Operation
Returns a cross-section: keeps only the rows in which the key columns hold the given key values, and removes the key columns from the result.
Key values and key columns are paired by position: the first key value is compared with the first key column, the second key value with the second key column, and so on. A row is kept when every pair is equal.
The rows that are kept stay in their original order.
Xs Modes
The key columns are either taken by position or selected explicitly. Both modes exist for DataFrame and for GroupBy:
xs(keyValues)— the key columns are the first columns of theDataFrame.xs(keyValues) { keyColumns }— the key columns are the selected ones.xs(keyValues)— the key columns are the first columns ofkeys.xs(keyValues) { keyColumns }— the key columns are the selected ones.
See also:
filter— selects rows by a condition and leaves all columns in place.remove— only removes columns, without selecting rows.
For more information: See xs on the documentation website.