Skip to content

Commit

Permalink
Drop rows with all nan values when loading data
Browse files Browse the repository at this point in the history
  • Loading branch information
gschivley committed May 13, 2024
1 parent f704679 commit f2071c6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions notebooks/fig_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ def load_data(data_path: Path, fn: str) -> pd.DataFrame:
if not ("output" in f.parts[-2] or "Results" in f.parts[-2]):
# print(f.parts[-2])
_df = pd.read_csv(f)
_df = _df.dropna(how="all")
df_list.append(_df)
if not df_list:
return pd.DataFrame(columns=DATA_COLS[fn.split(".")[0]])
Expand Down

0 comments on commit f2071c6

Please sign in to comment.