Hi, [I've also asked this on scipy-user, but since 'csv2rec' is a pylab function which is not part of NumPy, I thought maybe someone here can give me some pointers...]
Is there any extended documentation/tutorial on record arrays? The NumPy book is pretty cryptic about this and I'm still very new to the concept. I'm using the csv2rec function from matplotlib (pylab) to generate a record array from data that's in a CSV file. The CSV file basically has column labels in the first row and numerical data in all subsequent rows. The issues I'm struggling with are: 1. Is it possible to change the dtype of a field after the record array has been created? 2. The CSV file has missing data points - how do I turn these into python 'None' elements in the record array? (If I leave that element empty in the CSV file, then csv2rec complains about not being able to handle the import; if I put 'None' in the CSV file (without quotes), then the whole field including the 'None' and all the other float data is converted into a string dtype, rendering the numerical data useless). 3. Is it possible to obtain a subset of the original data (corresponding to two or more columns of the CSV file) as a conventional 2D numpy array, or can I access the data only individually by column (i.e. field in the record array)? Any pointers would be appreciated! Johann ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users