[Tutor] How to add a new column to a hierarchical dataframe grouped by groupby

2013-10-21 Thread Boris Vladimir Comi
The following script try to calculate the resulting average of the direction and magnitude of the wind. My monthly dataframe has the following column: data FechaHoraDirViento MagViento Temperatura Humedad PreciAcu 0 2011/07/01 00:003186.621.22 1

[Tutor] Getting daily averages with pandas

2013-10-11 Thread Boris Vladimir Comi
Boris Vladimir Comi escrito: I found a way to create daily averages of many variables, for example of a database that has the following structure: Fecha,Time, DirViento, MagViento, Temperatura, Humedad, PreciAcu. Each column is daily data every 15 minutes. I share the code, which, with

[Tutor] Plot trajectories on an map using matplotlib-basemap

2013-01-28 Thread Boris Vladimir Comi
#! /usr/bin/python import numpy as np data = np.loadtxt('path-tracks.csv',dtype=np.str,delimiter=',',skiprows=1) print data [['19.70' '-95.20' '2/5/04 6:45 AM' '1' '-38' 'CCM'] ['19.70' '-94.70' '2/5/04 7:45 AM' '1' '-48' 'CCM'] ['19.30' '-93.90' '2/5/04 8:45 AM' '1' '-60' 'CCM']

[Tutor] Plot multiple lines using python / basemap

2012-11-15 Thread Boris Vladimir Comi
Hi all: I have begun to learn about python / matplolib / basemap and really need some help. My data is in an Excel workbook with the following structure: Evento FechaLatitud Longitud Hora (UTC)

Re: [Tutor] Tutor Digest, Vol 98, Issue 51

2012-04-18 Thread Boris Vladimir Comi
the condition: to only print those values ​​(206-208) to be maintained for three hours or more Boris Vladimir Comi Gonzalez Universidad Nacional Autónoma de México Grupo de Tormentas Convecivas ___ Tutor maillist -

[Tutor] Help for to do a script

2012-03-16 Thread Boris Vladimir Comi
linux terminal ($ python TIR.py), to run it I get the following error: File "/home/mcidasv/JYTHON/TIR.py", line 22 count = count + 1; ^ SyntaxError: invalid syntax If anyone can help me with this script or any idea you suggest to improve it, I would greatly appreciate