我正在尝试使用Python2.7将熊猫中10年(1991-2000年)的每日温度数据转换为月份。我从网页(“http://owww.met.hu/eghajlat/eghajlati_adatsorok/bp/Navig/201j_EN.htm”)中获取了数据。但我有麻烦了。数据如下:
` datum d_ta d_tx d_tn d_rs d_rf d_ss
---------- ----- ----- ----- ----- ---- -----
1991-01-01 3.0 5.4 1.5 0.2 1 0.0
1991-01-02 4.0 7.2 1.9 0.0 1 6.8
1991-01-03 6.0 8.8 3.6 0.0 1 2.5
1991-01-04 3.7 7.6 2.3 . 2.9
1991-01-05 4.9 7.2 1.5 . 0.0
1991-01-06 2.7 6.2 0.5 . 0.9
1991-01-07 4.0 8.4 1.9 . 3.2
1991-01-08 6.7 8.9 4.6 0.0 0 0.0
1991-01-09 4.1 8.0 3.0 0.3 0 0.0
1991-01-10 4.2 8.1 2.4 0.0 0 0.2
1991-01-11 4.7 6.9 3.6 . 0.7
1991-01-12 7.0 9.8 3.2 . 0.1
1991-01-13 6.3 8.2 4.6 . 0.0
1991-01-14 3.7 6.8 2.2 . 4.7
1991-01-15 0.7 3.4 -1.0 . 7.6
1991-01-16 -1.4 1.4 -3.0 . 7.5
1991-01-17 -2.5 2.1 -5.0 . 8.1
1991-01-18 -1.8 4.0 -5.1 . 7.0
1991-01-19 -3.0 0.1 -4.0 . 5.8
1991-01-20 -2.8 0.5 -5.2 . 5.6
1991-01-21 -5.0 -1.7 -7.8 . 0.0
1991-01-22 -3.3 -1.8 -4.2 . 0.0
1991-01-23 -1.7 0.4 -2.5 . 0.0
1991-01-24 0.0 3.2 -1.6 . 2.2
1991-01-25 1.1 5.1 -0.9 . 6.4
1991-01-26 0.6 4.5 -0.5 . 7.1
1991-01-27 -1.5 2.2 -4.0 . 0.0
1991-01-28 1.3 5.6 -0.8 . 3.8
1991-01-29 0.7 2.6 -0.4 . 1.1
1991-01-30 0.3 4.0 -1.2 . 7.3
1991-01-31 -5.0 -0.2 -7.4 . 8.0
1991-02-01 -8.1 -3.7 -11.7 . 7.6
1991-02-02 -7.0 -2.0 -10.2 . 7.4
1991-02-03 -5.3 0.8 -9.9 . 7.8
1991-02-04 -5.1 -2.3 -7.7 0.1 4 3.7
1991-02-05 -7.5 -4.4 -8.3 . 2.6
1991-02-06 -7.1 -2.2 -11.0 2.0 4 4.9
1991-02-07 -1.8 0.0 -2.7 2.7 4 0.0
1991-02-08 -1.8 0.4 -3.6 21.8 4 0.0
1991-02-09 0.8 2.0 -0.2 1.3 1 0.0
1991-02-10 1.6 3.4 -0.2 3.4 1 0.0
1991-02-11 0.7 2.5 -0.5 1.1 4 0.0
1991-02-12 -0.5 1.2 -1.0 4.7 4 0.0
1991-02-13 -2.0 -0.8 -2.6 0.0 4 0.0
1991-02-14 -1.8 1.4 -3.5 0.1 4 6.3
1991-02-15 -4.2 -0.8 -6.4 . 8.4
1991-02-16 -5.6 -2.4 -9.5 0.1 4 1.5
1991-02-17 -1.3 1.9 -3.8 . 8.3
1991-02-18 -1.3 4.5 -5.5 . 8.5
1991-02-19 -1.5 3.6 -4.7 . 5.8
1991-02-20 -1.4 4.7 -5.4 . 7.3
1991-02-21 1.0 6.1 -2.1 . 6.9
1991-02-22 4.1 10.1 0.5 . 3.2
1991-02-23 5.1 9.7 2.9 . 7.5
1991-02-24 6.0 8.6 5.5 0.0 1 1.8
1991-02-25 3.6 9.2 0.6 . 8.1
1991-02-26 3.9 9.3 1.2 . 2.9
1991-02-27 3.1 6.5 0.3 . 8.8
1991-02-28 1.4 5.3 -2.4 . 4.3
1991-03-01 1.7 3.5 -0.2 . 0.0
1991-03-02 2.4 3.3 1.7 0.8 4 0.0
1991-03-03 3.1 3.8 1.7 . 0.0
1991-03-04 4.3 6.2 2.7 . 1.5
1991-03-05 3.0 5.7 0.6 . 1.2
.........`
有人能帮我怎么把它换算成月份吗。谢谢!你知道吗
从数字开始将表复制到内存后:
当然,您可以使用不同于平均数的聚合函数。输出:
相关问题 更多 >
编程相关推荐