From cc3f51d951251424d7b0d9b971295dc21b4f82ac Mon Sep 17 00:00:00 2001 From: Emmanuel Branlard Date: Fri, 20 Oct 2023 17:07:30 -0600 Subject: [PATCH] Misc updates --- weio/bladed_out_file.py | 2 +- weio/excel_file.py | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/weio/bladed_out_file.py b/weio/bladed_out_file.py index e91c031..26b4b86 100644 --- a/weio/bladed_out_file.py +++ b/weio/bladed_out_file.py @@ -77,7 +77,7 @@ def read_bladed_sensor_file(sensorfile): t_line = re.search(r'(?<=AXITICK).+?(?=AXISLAB)', combined_string, flags=re.DOTALL) t_line=t_line.group(0) # Replace consecutive whitespace characters with a single space - t_line = re.sub('\s+', ' ', t_line) + t_line = re.sub(r'\s+', ' ', t_line) except: pass diff --git a/weio/excel_file.py b/weio/excel_file.py index ea550ef..54ee8c8 100644 --- a/weio/excel_file.py +++ b/weio/excel_file.py @@ -18,10 +18,7 @@ def formatName(): def _read(self): self.data=dict() # Reading all sheets - try: - xls = pd.ExcelFile(self.filename, engine='openpyxl') - except: - xls = pd.ExcelFile(self.filename) + xls = pd.ExcelFile(self.filename, engine='openpyxl') dfs = {} for sheet_name in xls.sheet_names: # Reading sheet @@ -70,7 +67,7 @@ def _write(self): writer.save() def __repr__(self): - s ='Class XXXX (attributes: data)\n' + s ='Class ExcelFile (attributes: data)\n' return s