Traceback (most recent call last):
File "XXXX\Desktop\pytrendseries.py", line 8, in
import pytrendseries
File "XXX\Desktop\pytrendseries.py", line 13, in
trends_detected = pytrendseries.detecttrend(df, trend=trend, window=window)
AttributeError: partially initialized module 'pytrendseries' has no attribute 'detecttrend' (most likely due to a circular import)
import pandas as pd
df= pd.read_csv(r'..\stock.csv',header=0,index_col=0)
df.index = pd.to_datetime(df.index) df=pd.DataFrame(df['close'])
import pytrendseries
trend = "downtrend" window = 126 #6 months
trends_detected = pytrendseries.detecttrend(df, trend=trend, window=window)
Traceback (most recent call last): File "XXXX\Desktop\pytrendseries.py", line 8, in
import pytrendseries
File "XXX\Desktop\pytrendseries.py", line 13, in
trends_detected = pytrendseries.detecttrend(df, trend=trend, window=window)
AttributeError: partially initialized module 'pytrendseries' has no attribute 'detecttrend' (most likely due to a circular import)