From edbfd01a75d679f8fdb8819ab8cc720e5bfafd90 Mon Sep 17 00:00:00 2001 From: Antoine Goutenoir Date: Wed, 31 Mar 2021 21:02:09 +0200 Subject: [PATCH] fix: remove dep on PandasStringIO --- flaskr/controllers/main_controller.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flaskr/controllers/main_controller.py b/flaskr/controllers/main_controller.py index 63d17f1..0b5a3c6 100644 --- a/flaskr/controllers/main_controller.py +++ b/flaskr/controllers/main_controller.py @@ -20,7 +20,7 @@ from flask import ( abort, send_from_directory, ) -from pandas.compat import StringIO as PandasStringIO +# from pandas.compat import StringIO as PandasStringIO from wtforms import validators from yaml import safe_dump as yaml_dump @@ -90,7 +90,7 @@ def gather_addresses(from_list, from_file): if 'text/csv' == file_mimetype: rows_dicts = pandas \ - .read_csv(PandasStringIO(file_contents)) \ + .read_csv(StringIO(file_contents)) \ .rename(str.lower, axis='columns') \ .to_dict(orient="row") @@ -111,7 +111,7 @@ def gather_addresses(from_list, from_file): or from_file.filename.endswith('xlsx'): rows_dicts = pandas \ - .read_excel(PandasStringIO(file_contents)) \ + .read_excel(StringIO(file_contents)) \ .rename(str.lower, axis='columns') \ .to_dict(orient="row") -- libgit2 0.21.2