博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
datetime的精度
阅读量:7227 次
发布时间:2019-06-29

本文共 319 字,大约阅读时间需要 1 分钟。

最近有需要将分钟线的数据进行内联拼接,但时间没有必要精确到秒,微秒。

df['datetime'] = pd.to_datetime(df['datetime'])    df = df.set_index('datetime')    df.index = df.index.map(lambda x: x.replace(second=0, microsecond=0))
import datetime    datetime.datetime.now().replace(second=0, microsecond=0)

转载于:https://www.cnblogs.com/baishoujing/p/8757689.html

你可能感兴趣的文章
nagios监控服务出现FLAPPING状态时无法发出邮件报警信息
查看>>
数据库链接字符串方法
查看>>
The DCI Architecture: A New Vision of Object-Oriented Programming(一篇具有里程碑式意义的论文)...
查看>>
RIP路由配置实例V2
查看>>
Bytescout Spreadsheet SDK for.NET
查看>>
我的友情链接
查看>>
Haproxy的三种保持客户端会话保持方式
查看>>
iOS的数学函数
查看>>
python 模块 chardet下载及介绍(转)
查看>>
能力工场--关于在JavaScript中使用EL表达式的问题
查看>>
NFS服务器设置
查看>>
s:iterator 中的status 使用方法
查看>>
cocos2d-x 源码剖析系列
查看>>
IT系统架构设计
查看>>
Nginx虚拟主机配置实践(一)
查看>>
细谈Spring(一)spring简介
查看>>
网络工程师的面试题
查看>>
nginx启动脚本
查看>>
常用输入法框架简介
查看>>
记录新机房建设。20130629
查看>>