Skip to content

Commit

Permalink
Fix Readme and Spyder IDE (#9)
Browse files Browse the repository at this point in the history
* fix for spyder ide

* explicitly convert to list
  • Loading branch information
fred-sch authored Feb 8, 2022
1 parent 8b41f01 commit 544bbe5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def meteoblue_result_to_dataframe(geometry):

for code in geometry.codes:
name = str(code.code) + "_" + code.level + "_" + code.aggregation
df[name] = code.timeIntervals[0].data
df[name] = list(code.timeIntervals[0].data)

return df

Expand Down
4 changes: 2 additions & 2 deletions example_measurements.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"\n",
" for code in geometry.codes:\n",
" name = str(code.code) + \"_\" + code.level + \"_\" + code.aggregation\n",
" df[name] = code.timeIntervals[0].data\n",
" df[name] = list(code.timeIntervals[0].data)\n",
" return df\n",
"\n",
"def measurements_to_dataframe(measurements):\n",
Expand Down Expand Up @@ -329,4 +329,4 @@
"source": []
}
]
}
}
2 changes: 2 additions & 0 deletions meteoblue_dataset_sdk/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ def is_jupyter_notebook():
shell = get_ipython().__class__.__name__
if shell == "ZMQInteractiveShell":
return True # Jupyter notebook or qtconsole
elif shell == "SpyderShell":
return True # Spyder IDE
elif shell == "TerminalInteractiveShell":
return False # Terminal running IPython
else:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_measurement_query.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from meteoblue_dataset_sdk import ApiError, Client
from meteoblue_dataset_sdk.protobuf.measurements_pb2 import MeasurementApiProtobuf
from meteoblue_dataset_sdk.caching import FileCache
from meteoblue_dataset_sdk.protobuf.measurements_pb2 import MeasurementApiProtobuf

import asyncio
import logging
Expand Down

0 comments on commit 544bbe5

Please sign in to comment.