[I'm forwarding this to the list. Please remember that you need to subscribe 
before being able to send to this list.]

A Dijous 14 Juny 2007 14:39, escriguéreu:
> Hi,
>
> I'm new to pytables and would like to work with tables which have  
> multiple columns with variable length strings. This seems like a  
> common use case, but as most of the examples in the manual deal with  
> fixed-length strings I was wondering what the best practices are for  
> this situation. There are a few possibilities which occurred to me:
>
> 1) Make a group in which fixed width columns are kept in one table,  
> with separate VLArrays for each of the variable length columns using  
> the VLStringAtom(). Disadvantage: now the data is spread over the  
> place in multiple variables and the number of rows in the main table  
> and the individual VLArrays are not constrained to be the same.
>
> 2) Make a VLArray with an ObjectAtom for each row. Then encode each  
> row in the table as a single python object. Disadvantage: while  
> possible, now you can't do any kind of indexing and the benefits of  
> keeping the data in pytables format are less apparent.
>
> 3) Truncate variable length strings by estimating a maximum length of  
> each string, thereby forcing the data into a standard table with  
> fixed length StringCols. Disadvantage: This is a hack as it's not  
> always obvious what the maximum length will be. Moreover, space would  
> be wasted as most strings are much less than the maximum length.
>
> The basic issue is that VLStringCol does not exist.  I understand the  
> reasons for this (it breaks the concept of having a fixed-width  
> record length, unless you use a pointer in the record), but is there  
> any available workaround? E.g. is there any way to nest multiple  
> VLArray objects in a table?
>
> Thanks in advance for any advice you can offer.
>
> --Balaji
>
>
> PS: When is Pytables Pro scheduled to be released? The website says  
> April 2007, but I haven't seen any recent postings about it.
>
>
> --
> Balaji S. Srinivasan, Ph.D.
> Stanford University
> Lecturer, Depts. of Statistics and Computer Science
> 318 Campus Drive, Clark Center S251
> (650) 380-0695
> [EMAIL PROTECTED]
> http://jinome.stanford.edu

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to