- spac.phenotyping.is_binary_0_1(column)[source]
Check if a pandas Series contains only binary values (0 and 1).
- Parameters:
column (pandas.Series) – The pandas Series to check.
- Returns:
True if the Series contains only 0 and 1, False otherwise.
- Return type:
bool
Notes
The function considers a Series to be binary if it contains exactly the values 0 and 1, and no other values.