Skip to Content
Python数据科学手册
book

Python数据科学手册

by Jake VanderPlas
January 2018
Intermediate to advanced
470 pages
13h 23m
Chinese
Posts & Telecom Press
Content preview from Python数据科学手册
Pandas
数据处理
|
179
绍了时间序列工具在商业与金融业务中的应用,作者用大量笔墨介绍了工作日历、时区和
相关主题的具体内容。
你当然可以用
IPython
的帮助功能来浏览和深入探索上面介绍过的函数与方法,我个人认
为这是学习各种
Python
工具的最佳途径。
3.12.7
 案例
:
美国西雅图自行车统计数据的可视化
下面来介绍一个比较复杂的时间序列数据,统计自
2012
年以来每天经过美国西雅图弗
莱蒙特桥(
http://www.openstreetmap.org/#map=17/47.64813/-122.34965
)上的自行车的数
量,数据由安装在桥东西两侧人行道的传感器采集。小时统计数据可以在
http://data.seattle.
gov/
下载,还有一个数据集的直接下载链接
https://data.seattle.gov/Transportation/Fremont-
Bridge-Hourly-Bicycle-Counts-by-Month-Octo/65db-xm6k
。
截至
2016
年夏,
CSV
数据可以用以下命令下载:
In[34]:
# !curl -o FremontBridge.csv
# https://data.seattle.gov/api/views/65db-xm6k/rows.csv?accessType=DOWNLOAD
下好数据之后,可以用
Pandas
读取
CSV
文件获取一个 DataFrame。我们将 Date 作为时间
索引,并希望这些日期可以被自动解析:
In[35]: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

流畅的Python

流畅的Python

Luciano Ramalho
Python数据分析基础

Python数据分析基础

Clinton W. Brownley
Python数据处理

Python数据处理

Jacqueline Kazil, Katharine Jarmul

Publisher Resources

ISBN: 9787115475893