From d04ecdd791879e9b3593968bf34d85e3ddec4213 Mon Sep 17 00:00:00 2001 From: Mohammed Saleh <34711999+MDSH14@users.noreply.github.com> Date: Tue, 9 Nov 2021 14:39:14 +0200 Subject: [PATCH] Update Engezny.py --- Engezny/Engezny.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Engezny/Engezny.py b/Engezny/Engezny.py index 0da05dc..a4aed94 100644 --- a/Engezny/Engezny.py +++ b/Engezny/Engezny.py @@ -18,9 +18,12 @@ def __value_counts(self, Data, multi_sep=None, single_sep=None): Dict = dict() try: for i in Data.dropna().index: - Words = str(Data).split(multi_sep) + Words = str(Data[i]).split(multi_sep) for Word in Words: - Word = Word.split(single_sep)[0].strip() + if single_sep != None: + Word = Word.split(single_sep)[0].strip() + else: + Word = Word.strip() if Word in Dict.keys(): Dict[Word] += 1 else: