Skip to content

Commit

Permalink
tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshiggie committed Dec 6, 2023
1 parent 17e66cc commit 9dc0965
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions seeq/addons/mps/_mps_sdl_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,14 +638,16 @@ def get_worksheet_data(self, workbook_id, worksheet_id):
count += 1

for c in data_pull.columns:
# Check if the column is not already float64
# Check if the column is not already float64
if data_pull.dtypes[c] != 'float64':
# Use to_numeric for conversion, set errors='coerce' to handle exceptions
data_pull[c] = pd.to_numeric(data_pull[c], errors='coerce')

# If after conversion column is still not float64, remove from signal_list if it exists
if data_pull.dtypes[c] != 'float64':
if c in signal_list:
try:
data_pull[c] = data_pull[c].astype('float64')
except:
signal_list.remove(c)
except:
pass
Expand Down

0 comments on commit 9dc0965

Please sign in to comment.