从Numpy1.7开始,已经有了原生的日期-时间支持,基本类型称为datetime64. In [1]: import numpy as np In [2]: nd = np.datetime64('2018-05-08') In [3]: nd Out[3]: numpy.datetime64('2018-05-08') 和datetime一样,datetime64对象可以表示为字符串对象. In [4]: np.datetime_as_string(nd) Out[4]: '2018-05-
import numpy as np import pandas as pd Pandas will be a major tool of interest throughout(贯穿) much of the rest of the book. It contains data structures and manipulation tools designed to make data cleaning(数据清洗) and analysis fast and easy in Python.