Commit 59a34371 authored by Nic's avatar Nic
Browse files

[io] clean blank lines when reading excel (dropna)

parent 519b6f3c
......@@ -83,7 +83,9 @@ def read_data(fpath, sheet_name=None, engine=DEFAULT_EXCEL_ENGINE):
def read_excel(fpath, sheet_name=None, engine=DEFAULT_EXCEL_ENGINE):
"""read excel file using pandas"""
return pd.read_excel(fpath, sheet_name=sheet_name, engine=engine)
df_dict = pd.read_excel(fpath, sheet_name=sheet_name, engine=engine)
# remove any blank lines
return {k: df.dropna(how='all') for k, df in df_dict.items()}
def read_configobj(fpath, sheet_name=None, row_prefix="sniff"):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment