diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-13 13:08:38 -0600 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2023-10-13 13:08:38 -0600 |
commit | ea2d292561d940378eb155ffdcaa11d06d0e8b0a (patch) | |
tree | f1e30523d45c3a05dd4ae5deed4e0472460751a6 /main.py | |
parent | 059e2209ac8ec0f556a2e5b19c959ffa58086192 (diff) |
fix reading NA as NaN
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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: |