pandas 日期时间系列
示例
import pandas as pd
import numpy as np
np.random.seed(0)
rng = pd.date_range('2015-02-24', periods=5, freq='T')
s = pd.Series(np.random.randn(len(rng)), index=rng)
print (s)
2015-02-24 00:00:00 1.764052
2015-02-24 00:01:00 0.400157
2015-02-24 00:02:00 0.978738
2015-02-24 00:03:00 2.240893
2015-02-24 00:04:00 1.867558
Freq: T, dtype: float64
rng = pd.date_range('2015-02-24', periods=5, freq='T')
s1 = pd.Series(rng)
print (s1)
0 2015-02-24 00:00:00
1 2015-02-24 00:01:00
2 2015-02-24 00:02:00
3 2015-02-24 00:03:00
4 2015-02-24 00:04:00
dtype: datetime64[ns]
热门推荐
10 简短搞笑蛋糕生日祝福语
11 生日祝福语对妈妈简短
12 天仙配简短祝福语
13 孩子满月红包祝福语简短
14 考进高中祝福语简短
15 致敬大国工匠祝福语简短
16 牛年公司新年祝福语简短
17 朝鲜元旦祝福语大全简短
18 退伍祝福语老师简短