[SATLUG] simple python list question

Don Davis dondavis at reglue.org
Fri May 24 20:07:41 CDT 2013


Ha. Yeah. I was in the process of converting into a string and using the
're' module and splitting, but that didn't seem the most efficient way....

Thank you.

[And the field comes from a JSON so it's appropriate.]


On 05/24/2013 08:05 PM, buddylee48 wrote:
> There are always a million ways to solve this but probably the easiest and
> simplest solution to understand is simply use the simplejson module.
> 
>     import simplejson as json
> 
>     myList = json.loads(row[element])
>  On May 24, 2013 7:57 PM, "Don Davis" <dondavis at reglue.org> wrote:
> 
>> I'm asking these here so as to not get reamed out on StackOverflow.
>>
>> I'm importing data from a CSV.
>> One field has a list with brackets: e.g. ["sally", "bobby"]
>> I've tried flattening the list to no effect. I've tried splitting it at
>> ','. However, it is always seen as a list of single characters.
>>
>> I've seen this behavior before (I think) and I'm not sure how to amend it.
>>
>>
>>
>> ?
>> --
>> _______________________________________________
>> SATLUG mailing list
>> SATLUG at satlug.org
>> http://alamo.satlug.org/mailman/listinfo/satlug to manage/unsubscribe
>> Powered by Rackspace (www.rackspace.com)
>>


More information about the SATLUG mailing list