Skip to content

Commit

Permalink
added a comment to df_error
Browse files Browse the repository at this point in the history
  • Loading branch information
ntalluri committed Aug 15, 2024
1 parent a9c8238 commit d5c5865
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions spras/analysis/ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ def summarize_networks(file_paths: Iterable[Union[str, PathLike]]) -> pd.DataFra
return concated_df

def df_error(dataframe: pd.DataFrame):
"""
Raises an error if the dataframe is empty or contains one pathway (one row)
"""
if dataframe.empty:
raise ValueError("ML post-processing cannot proceed because the summarize network dataframe is empty.\nWe "
"suggest setting ml include: false in the configuration file to avoid this error.")
Expand Down

0 comments on commit d5c5865

Please sign in to comment.