[Python-es] pytables/hdf5 to ascii/csv/excel

Antonio Alvarado Hernández aalvaradoh en gmail.com
Jue Dic 23 14:44:57 CET 2010


Hola Kiko,

Prueba con: http://code.google.com/p/h5py/

-aah

On Thu, Dec 23, 2010 at 10:36 AM, Kiko <kikocorreoso en gmail.com> wrote:
> Hola a todos.
>
> El problema es el siguiente:
>
> Tengo tablas en ficheros hdf5 y me gustaría pasar las tablas a ficheros
> excel (o csv/ascii) a pelo.
>
> He estado investigando por ahí y una respuesta de Francesc Alted a esta
> pregunta la leo en [1] y dice lo siguiente:
>
>> What python tools are recommended to convert hdf5 tables to
>> ascii/csv?
>
> In general, it is best to retrieve NumPy objects out of PyTables ones,
>
> and then use the NumPy/Python output capabilities to generate the
> desired ascii/csv files.  If in doubt, ask the NumPy list for how to do
> this efficiently (I've read that they are working on improved methods
>
> for output arrays in different ascii formats).
>
> Esto se podría hacer usando numpy.savetxt [2]
>
> Otra opción sería usar h5dump [3].
>
> La pregunta es, ¿habría alguna forma más rápida y directa de poder pasar una
> tabla hdf5 a un fichero ascii/csv/excel en python/numpy?
>
> Gracias y feliz navidad a todos.
>
> [1] http://blog.gmane.org/gmane.comp.python.pytables.user/month=20090101
> [2]
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html#numpy.savetxt
> [3] http://www.hdfgroup.org/HDF5-FAQ.html#toexcel
>
> _______________________________________________
> Python-es mailing list
> Python-es en python.org
> http://mail.python.org/mailman/listinfo/python-es
> FAQ: http://python-es-faq.wikidot.com/
>
>


Más información sobre la lista de distribución Python-es