From 90e5052c9d741ad9b39eebc535228fda1cdefca5 Mon Sep 17 00:00:00 2001
From: Sortofamudkip <wishyutp0328@gmail.com>
Date: Sat, 8 Jul 2023 18:36:28 +0200
Subject: [PATCH] get_is_narcissist_col()

---
 src/Dataset.py | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/Dataset.py b/src/Dataset.py
index 69583d9..f32f769 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:
-- 
GitLab