python - 如何让dataframe中两列时间相减?
ringa_lee
ringa_lee 2017-04-18 10:33:13
0
1
1270

ringa_lee
ringa_lee

ringa_lee

reply all(1)
左手右手慢动作

If the two field types do not match, the operation cannot be performed.
Convert the type before the operation.

df['age'] = pd.to_datetime(df['indate']) - pd.to_datetime(df['dob'])
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!