Skip to content
Snippets Groups Projects
Commit 9b1b9df2 authored by Yan Grange's avatar Yan Grange :wave:
Browse files

Add warning if the basket is empty for a connector

parent f64ce1a6
No related branches found
No related tags found
2 merge requests!10Add warning if the basket is empty for a connector,!9Check items before concatenating
...@@ -149,6 +149,8 @@ class shopping_client: ...@@ -149,6 +149,8 @@ class shopping_client:
if len(items): if len(items):
converted_basket[connector.name] = pd.concat(items, axis=1) converted_basket[connector.name] = pd.concat(items, axis=1)
else:
warn(f"Connector {connector.name} specified but no data found for it in shopping basket. Result will not contain an entry named {connector.name}.")
return { return {
name: data.to_frame().T if data.ndim < 2 else data.T name: data.to_frame().T if data.ndim < 2 else data.T
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment