【发布时间】:2015-04-29 05:51:04
【问题描述】:
我是 anaconda 包和 python 的新手。我必须绘制地震数据。我在谷歌上读到 pandas 使用 matplotlib 和 csv。以下是数据。
time,mag,magType
2015-02-19T06:32:52.870Z,0.74,ml
2015-02-19T06:07:17.510Z,0.55,md
2015-02-19T06:07:03.720Z,1.01,md
2015-02-19T06:03:26.070Z,4.6,mb
2015-02-19T05:59:25.840Z,1.44,ml
2015-02-19T05:55:55.000Z,1.6,ml
2015-02-19T05:52:43.880Z,0.57,md
2015-02-19T05:45:01.820Z,0.71,ml
2015-02-19T05:39:25.430Z,0.41,ml
我需要将 2015-02-19T05:39:25.430Z 转换为类似于 2015-02-19 05:39:25 的日期时间格式并将它们绘制在图表上。我想使用的图表类型是折线图。
要求 - - 绘制时间与幅度图 - 在图表上绘制每周的总发生次数,其中每次发生的幅度 > 2
【问题讨论】:
标签: python csv pandas matplotlib