Commit 978a2fac authored by Nic's avatar Nic
Browse files


parent 2e8773e2
......@@ -85,7 +85,7 @@ def read_excel(fpath, sheet_name=None, engine=DEFAULT_EXCEL_ENGINE):
"""read excel file using pandas"""
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()}
return {k: df.dropna(how="all") for k, df in df_dict.items()}
def read_configobj(fpath, sheet_name=None, row_prefix="sniff"):
......@@ -429,7 +429,7 @@ class DataFrameSchematizer:
df_num[col] = df_num[col]
df = pd.concat((df_num.pint.dequantify(), df_nonnum), axis=1)
# re-arrange columns: restrict to level 0 and reorder as initially
df.columns = [t[0] for t in df.columns.tolist()]
df.columns = [t[0] for t in df.columns.tolist()]
df = df[[c for c in initial_without_urow.columns]]
# =====================================================================
# fill empty values as requested by schema
Markdown is supported
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