-
Notifications
You must be signed in to change notification settings - Fork 944
Description
Hi Rob,
Working on uploading historical futures data from CSI into the system, almost there, but notice the print statement inside process_adjusted_prices_single_instrument function is failing an assertion inside pandas code
` def _ensure_type(self: T, obj) -> T:
"""Ensure that an object has same type as self.
Used by type checkers.
"""
assert isinstance(obj, type(self)), type(obj)
return obj`
Anyway, if I comment out the print statement the adjusted prices are created fine. Below is the stack.
File "/Users/batman/Documents/Python Projects/pysystemtrade/sysinit/futures/adjustedprices_from_mongo_multiple_to_mongo.py", line 33, in process_adjusted_prices_single_instrument
print(adjusted_prices)
File "/Users/batman/opt/anaconda3/lib/python3.7/site-packages/pandas/core/series.py", line 1371, in repr
length=show_dimensions,
File "/Users/batman/opt/anaconda3/lib/python3.7/site-packages/pandas/core/series.py", line 1435, in to_string
max_rows=max_rows,
File "/Users/batman/opt/anaconda3/lib/python3.7/site-packages/pandas/io/formats/format.py", line 260, in init
self._chk_truncate()
File "/Users/batman/opt/anaconda3/lib/python3.7/site-packages/pandas/io/formats/format.py", line 285, in _chk_truncate
concat((series.iloc[:row_num], series.iloc[-row_num:]))
File "/Users/batman/opt/anaconda3/lib/python3.7/site-packages/pandas/core/base.py", line 93, in _ensure_type
assert isinstance(obj, type(self)), type(obj)
AssertionError: <class 'pandas.core.series.Series'>