>>> haha = pd.DataFrame({'时间':['2017-01-01 13:15:00','2017-01-01 01:30:00','2017-01-01 04:45:00']})
>>> haha['时间'] = haha['时间'].str.slice(11,13,1)
>>> haha['时间']
0 13
1 01
2 04
Name: 时间, dtype: object
>>> haha.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 3 entries, 0 to 2
Data columns (total 1 columns):
时间 3 non-null object
dtypes: object(1)
memory usage: 152.0+ bytes
>>> haha['时间'] = haha['时间'].astype(float)
>>> haha['时间']
0 13.0
1 1.0
2 4.0
Name: 时间, dtype: float64
>>> haha['时间'] = haha['时间']/10
>>> haha['时间']
0 1.3
1 0.1
2 0.4
Name: 时间, dtype: float64
>>>