问题描述
初始df有4列:
日期时间,生产线编号,var1,var2,运行中
date_time是:时间戳
production_line_no是:用于标识生产线的分类
var1,var2是:数字
running:是指示生产线是否正在运行的布尔值
我需要沿着运行周期时间进行几次聚合,并将其返回到包含运行周期开始和结束(均值= 1)的时间戳以及聚合的var和production_line_no
最终df必须看起来像这样:
开始date_time,end_date_time,Time_delta,production_line_no,var1_aggregation_1,var1_aggregation_2,var2_aggregation_1,var2_aggregation_2,....
有人知道如何实现吗? 谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)