5.22. hselect

Returns a DataFrame containing the specified keys.


FitsArray.hselect(self, fields: str | List[str]) pd.DataFrame

Returns a DataFrame containing the specified keys.

Parameters

fieldsUnion[str, List[str]]

The fields (keys) to be selected.

Returns

pd.DataFrame

A DataFrame containing the header values of the specified keys.


5.22.1. Example:

from myraflib import FitsArray

fa = FitsArray.sample()
selected_header = fa.hselect(["KEY1", "KEY2"])