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
数据处理
|
169
代码 含义 时间跨度 (相对) 时间跨度 (绝对)
ms
毫秒(
millisecond
) ±
2.9e9
年
[ 2.9e6 BC, 2.9e6 AD]
us
微秒(
microsecond
) ±
2.9e6
年
[290301 BC, 294241 AD]
ns
纳秒(
nanosecond
) ±
292
年
[ 1678 AD, 2262 AD]
ps
皮秒(
picosecond
) ±
106
天
[ 1969 AD, 1970 AD]
fs
飞秒(
femtosecond
) ±
2.6
小时
[ 1969 AD, 1970 AD]
as
原秒(
attosecond
) ±
9.2
秒
[ 1969 AD, 1970 AD]
对于日常工作中的时间数据类型,默认单位都用纳秒
datetime64[ns]
,因为用它来表示时
间范围精度可以满足绝大部分需求。
最后还需要说明一点,虽然
datetime64
弥补了
Python
原生的
datetime
类型的不足,但它
缺少了许多
datetime
(尤其是
dateutil
)原本具备的便捷方法与函数,具体内容请参考
NumPy
的
datetime64
文档(
http://docs.scipy.org/doc/numpy/reference/arrays.datetime.html
)。
3. Pandas
的日期与时间工具
:
理想与现实的最佳解决方案
Pandas
所有关于日期与时间的处理方法全部都是通过 Timestamp 对象实现的,它利用
numpy.datetime64 的有效存储和向量化接口将 ...
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