osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to fast processing one million strings to remove quotes


Daiyue Weng wrote:

> On 2 August 2017 at 19:13, Peter Otten <__peter__ at web.de> wrote:
> 
>> Daiyue Weng wrote:
>>
>> > Hi, I am trying to removing extra quotes from a large set of strings (a
>> > list of strings), so for each original string, it looks like,
>> >
>> > """str_value1"",""str_value2"",""str_value3"",1,""str_value4"""
>>
>> Where did you get that strange list from in the first place?
>>
>> If it is read from a file it is likely that you can parse the data into
>> the desired format directly, e. g. by using the csv module.

> it is getting from an encrypted and snappy file
 
Provided it is only a few lines it might be helpful if you could post the 
code to create the list ;)