diff --git a/src/Dataset.py b/src/Dataset.py index 69583d906a0bca5273c9abef710af78b3ed1493b..f32f769c0c6cbc591eb47e311af6142aa1884de4 100644 --- a/src/Dataset.py +++ b/src/Dataset.py @@ -31,7 +31,7 @@ class Dataset: return dataframe def get_combined_anxiety_score(self, dataframe: pd.DataFrame) -> pd.Series: - """Get the combined axiety score, as a column. + """Get the combined anxiety score, as a column. This score is based on the GAN, SPIN and SWL metrics. Each of the three columns are first normalised, then the mean is returned. @@ -54,7 +54,17 @@ class Dataset: combined = (gad_normalised + spin_normalised + swl_flipped) / 3 return combined - def get_is_narcissist_col(self, dataframe: pd.DataFrame): + def get_is_narcissist_col(self, dataframe: pd.DataFrame) -> pd.Series: + """Get a boolean narcissist column. + The Narcissism score of 1.0 is considered Not a Narcissist, + while all values above that are above are considered Narcissist. + + Args: + dataframe (pd.DataFrame): the dataframe + + Returns: + pd.Series: the boolean narcissist column. + """ return np.where(dataframe["Narcissism"] <= 1.0, True, False) def get_dataframe(self) -> pd.DataFrame: