#회귀선 기울기, 상수항
slope, intercept, _, _, _, = sp.stats.linregress(data.index, data.Close)
print(slope, intercept)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
C:\Users\Public\Documents\ESTsoft\CreatorTemp/ipykernel_33508/738026083.py in <module>
2
3 #회귀선 기울기, 상수항
----> 4 slope, intercept, _, _, _, = sp.stats.linregress(data.index, data.Close)
5 print(slope, intercept)
AttributeError: module 'scipy' has no attribute 'stats'
scipy 패키지는 많은 서브패키지를 가지고 있어 자동으로 서브패키지를 임포트하지 못함
ex)
from scipy import stats, interpolate