diive.keep_vars¶
- diive.keep_vars(data, variables, verbose=False)[source]¶
Keep only the given variables (columns), preserving their order.
A non-destructive variable subselection (the column analogue of
times.keep_daterange): returns a copy containing onlyvariablesin the requested order, leaving the input untouched so the caller can keep the full record and revert. Every requested name must exist.- Parameters:
- Return type:
- Returns:
A copy of
datarestricted tovariables.- Raises:
ValueError – If any requested name is not present in the data.