jealous / stockstats

Supply a wrapper ``StockDataFrame`` based on the ``pandas.DataFrame`` with inline stock statistics/indicators support.
Other
1.26k stars 297 forks source link

import StockDataFrame出错 #177

Closed Dclpwos closed 9 months ago

Dclpwos commented 9 months ago

Traceback (most recent call last): File "G:\quantProjects\DRLquant\Ashare_example\tset.py", line 1, in from stockstats import StockDataFrame as Sdf File "D:\ProgramData\Miniconda3\envs\DRLstock\Lib\site-packages\stockstats.py", line 94, in def set_dft_window(name: str, windows: Union[int, tuple[int, ...]]): TypeError: 'type' object is not subscriptable

Dclpwos commented 9 months ago

解决了,# At the top of the code, along with the other imports from future import annotations

CYLEE21 commented 9 months ago

Could you make it more specific? I also have the same error message.

jealous commented 9 months ago

At the beginning of the code, try adding from future import annotations