1.用pandas_datareader获取阿里巴巴股票数据 2.用matplotlib将股票收盘价的数据,绘制成折线走势图 3.用pandas处理股价数据 第一步,安装pandas_datareader 首先,使用pip方法安装pandas和pandas-datareader两个功能包. 安装的方法十分简单,以管理员身份运行cmd. 输入以下命令。 pip install pandas-datareader 第二步,获取...
GitHub地址:https://github.com/pydata/pandas-datareader frompandas_datareaderimportdataimportmatplotlib.pyplotaspltimportpandasaspd stock_code=input("美股直接输入股票代码如GOOG \n港股输入代码+对应股市,如腾讯:0700.hk \n国内股票需要区分上证和深证,股票代码后面加.ss或者.sz\n请输入你要查询的股票代码:")...
#获取国内股票数据:获取国内股市的方式“股票代码”+“对应股市”。上证股票是股票代码后面加上.ss,获取深市300481 2015年1月1日到2015年8月20的数据web.get_data_yahoo('300481.sz','1/1/2015','20/8/2015') 编辑于 2017-12-19 11:06 数据分析 写下你的评论... 默认 最新 名为ECON实为CORP 最近yah...
390 session=session, 391 ).read() File /opt/miniconda3/lib/python3.12/site-packages/pandas_datareader/base.py:253, in _DailyBaseReader.read(self) 251 # If a single symbol, (e.g., 'GOOG') 252 if isinstance(self.symbols, (string_types, int)): --> 253 df = self._read_one_data(...
这不是答案,但我认为问题与pdr数据读取器从yahoo本身获取数据有关 到
'https://finance.yahoo.com/quote/GOOG/history?period1=1420065000&period2=1609453799&interval=1d&...