导入需要的库
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
plt.style.use('seaborn')
import warnings
warnings.filterwarnings('ignore')
import yfinance as yf
import ta
导入金融数据
df = yf.download('GOOG', proxy="http://127.0.0.1:7890")
df

我们只需要”Adj Close”一列数据,因此我们将该列数据单独挑选出来:
df = df[['Adj Close']] df

为了后面的操作更方便,在这里将收盘价的列名称修改为“close”
df.columns = ['close'] df

原创文章,作者:朋远方,如若转载,请注明出处:https://caovan.com/09-xianxinghuiguisuanfazaijinrongdeyingyonganli/.html


微信扫一扫