routine = array([['MO']], dtype='|S2')

dates = array([[datetime.datetime(2013, 2, 27, 13, 1, 42]])

counts = matrix([[ 25528.]])

sza = array([[ 126.77926586]])

error = matrix([[ 76.]])

point_sza = array([[ 0.]])

From here I put the data into a DataFrame:

- Code: Select all
`import pandas as pd`

from numpy import *

tmp = pd.DataFrame(hstack( (routine,counts,error,point_sza,sza) ),

columns = ['routine','counts','count_error','point_sza','sza'],

index = dates)

The problem is caused by the string (routine) that has dtype='S2' when I "hstack" the data:

- Code: Select all
`>>> tmp`

routine counts count_error point_sza sza

2013-02-27 13:01:42 MO 25 76 0. 12

Counts should be 25528, but it got cut to 25...and converted to string because of "routine".

Is there a way to create the DataFrame while maintaining the original type/length of my numerical values?