我正在尝试对不明飞行物目击事件的开放数据进行一些分析。我已经从国家UFO报告中心收集了数据。
数据如下所示:
Date / Time City State Shape Duration Summary Posted
9/29/15 04:00 Wheaton IL Unknown 3 minutes Object hovering for 1 minute, brightly lite and loud. Then moved past slowly. I called FAA to see if they knew what it was, they transf 9/29/15
9/28/15 23:17 Hendersom NV Triangle ~1 minute V-shape/triangle UFO sighting in Henderson and Las Vegas, NV. 9/29/15
9/28/15 22:08 Dousman WI Fireball 5 minutes Bright yellowish/white light hovering, no sound of craft. 9/29/15
9/28/15 21:10 Tacna AZ Triangle ~15 seconds Brightly lit craft flew and hovered right in front of us, then disappeared. 9/29/15
9/28/15 20:35 York ME Triangle 10 minutes Triangle bright flashing white light, releasing a red and white pattern craft heading straight up. 9/29/15
有成百上千条记录,现在我在读取“持续时间”列的数据时遇到了一个问题,因为它是以简单文本编写的。我希望它是一个表示时间的数字(3分钟为3,30秒为0.5,依此类推)。我想自动化将列转换为实际持续时间的过程。
如何在Excel中做到这一点?(或者甚至在R ??中)
假设“持续时间”数据在E列中,请在第2行的空白单元格中尝试使用此公式:
=MID(SUBSTITUTE(E2,"~",""),1,2)/IFERROR(IF(FIND("seconds",E2),60),1)
现在,根据需要复制下来。
注意:此公式假定没有复合时间,并且使用的唯一时间单位是分钟和秒;它没有提供任何时间的准备。如果您需要几个小时,请告诉我。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句