python中pandas_datareader库怎么用?
python中pandas_datareader库怎么用?
日前,新闻上报道比特币已经突破4万美元的大关,对于金融行业,是依靠那些编程工具进行支撑的呢,今日给大家说一个可以远程获取金融数据的工具库——pandas_datareader,大家如果对金融设计感兴趣的话,可以跟着小编结合案例进行学习,一起来了解下吧~
使用方式:
pandas_datareader包的引入
安装方式:
pipinstallpandas_datareader
获取股票信息:
importpandas_datareaderaspdr
importmatplotlib.pyplotasplt
fromdatetimeimportdatetime
start=datetime(2019,12,1)
end=datetime.today()
alibaba=pdr.get_data_yahoo('BABA',start,end)
#前10条
print(alibaba.head(10))
#最后10条
print(alibaba.tail(10))
print(alibaba.shape)
到此,对于pandas_datareader库的相关介绍就结束了,如果正需要该库的学习使用,希望本章内容可以帮助大家学习。更多Python学习教程请关注IT培训机构:千锋教育。

相关推荐HOT
更多>>
python中wordcloud库如何生成词云?
python中wordcloud库如何生成词云?可能有些小伙伴不了解词云是什么,其实主要作用是为了快速解决类问题的方法,它能够实现凸显关键词,快速帮助...详情>>
2023-11-11 02:14:00
python的概率分布有哪些类型?
python的概率分布有哪些类型?python数据可视化。无非是把各种各样的数据以视图的形式展现出来,可以更直观的分析数据。python的数据可视化离不...详情>>
2023-11-11 00:43:24
python中socket如何测试程序?
python中socket如何测试程序?1、编写server的步骤(1)是创建socket对象。调用socket构造函数。如:socket=socket.socket(family,type)(2)是详情>>
2023-11-11 00:19:01
python函数装饰器的应用过程
python函数装饰器的应用过程1、应用过程一般是定义在一个独立模块中,使用时会被导入到其它模块;函数装饰器会在内部定义一个新函数,然后返回。...详情>>
2023-11-10 22:33:56热门推荐
python汉诺塔递归函数是什么?
沸Python3中的tuple函数是什么?
热python关键字有哪些?
热python中doctest模块如何使用?
新python中定时器的实现方式
python中写入文件的出错解决
python中wordcloud库如何生成词云?
python中pandas_datareader库怎么用?
python中SQLAlchemy是什么?
python中如何实现简单的洗牌算法
python的概率分布有哪些类型?
python中socket如何测试程序?
pythonLogging是什么?
python如何应用于数据的基础统计分析
技术干货






