summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2023-10-13 13:08:38 -0600
committerNavan Chauhan <navanchauhan@gmail.com>2023-10-13 13:08:38 -0600
commitea2d292561d940378eb155ffdcaa11d06d0e8b0a (patch)
treef1e30523d45c3a05dd4ae5deed4e0472460751a6 /main.py
parent059e2209ac8ec0f556a2e5b19c959ffa58086192 (diff)
fix reading NA as NaN
Diffstat (limited to 'main.py')
-rw-r--r--main.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.py b/main.py
index c1f47cc..ff63485 100644
--- a/main.py
+++ b/main.py
@@ -172,7 +172,7 @@ class CompanySelector:
with open(path.join(user_data_dir(appname, appauthor), "default.txt"), "w") as f:
f.write(file_path)
try:
- self.df = pd.read_excel(file_path)
+ self.df = pd.read_excel(file_path, keep_default_na=False)
self.df = self.df[self.df['Company Name'].notna()]
self.df = self.df[self.df['Symbol'].notna()]
except Exception as e:
@@ -188,7 +188,7 @@ class CompanySelector:
with open(path.join(user_data_dir(appname, appauthor), "default.txt")) as f:
try:
fname = f.read()
- self.df = pd.read_excel(fname)
+ self.df = pd.read_excel(fname, keep_default_na=False)
self.df = self.df[self.df['Company Name'].notna()]
self.df = self.df[self.df['Symbol'].notna()]
except Exception as e: