Skip to content

Commit

Permalink
Add error handling for invalid obj type in _get_timeline_dataframe.
Browse files Browse the repository at this point in the history
  • Loading branch information
atrabattoni committed May 22, 2024
1 parent 5976273 commit 3ca06ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xdas/core/routines.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,4 +878,8 @@ def _get_timeline_dataframe(obj, dim="first", name=None):
for key, val in obj.items()
]
dataframe = pd.concat(dataframes)
else:
raise TypeError(
f"`obj` must be a DataArray of a DataCollection, found {type(obj)}"
)
return dataframe

0 comments on commit 3ca06ad

Please sign in to comment.