Commit edbfd01a75d679f8fdb8819ab8cc720e5bfafd90

Authored by Antoine Goutenoir
1 parent 2d128842
Exists in master

fix: remove dep on PandasStringIO

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
flaskr/controllers/main_controller.py
... ... @@ -20,7 +20,7 @@ from flask import (
20 20 abort,
21 21 send_from_directory,
22 22 )
23   -from pandas.compat import StringIO as PandasStringIO
  23 +# from pandas.compat import StringIO as PandasStringIO
24 24 from wtforms import validators
25 25 from yaml import safe_dump as yaml_dump
26 26  
... ... @@ -90,7 +90,7 @@ def gather_addresses(from_list, from_file):
90 90 if 'text/csv' == file_mimetype:
91 91  
92 92 rows_dicts = pandas \
93   - .read_csv(PandasStringIO(file_contents)) \
  93 + .read_csv(StringIO(file_contents)) \
94 94 .rename(str.lower, axis='columns') \
95 95 .to_dict(orient="row")
96 96  
... ... @@ -111,7 +111,7 @@ def gather_addresses(from_list, from_file):
111 111 or from_file.filename.endswith('xlsx'):
112 112  
113 113 rows_dicts = pandas \
114   - .read_excel(PandasStringIO(file_contents)) \
  114 + .read_excel(StringIO(file_contents)) \
115 115 .rename(str.lower, axis='columns') \
116 116 .to_dict(orient="row")
117 117  
... ...