

Result.append(replace] + row) # replace data Replace = ĭelete = set( (row for row in read_file("d.csv")) ) If row: # eliminate empty rows from data read Reader = csv.reader(f, quotechar='"',delimiter=",") I changed your data a bit to incorperate the mentioned "escaped" data including newlines:įile creation: with open("i.csv","w") as f: Loop over your data and use the both lookups to "do the right thing".

if your data-row start with it: skip row else add it to the output.read the things you want to delete into a set.set key to what is in your datas 0th spot, set value as what to replace the 0th and 1st spot of your data with.read the things you want to replace in a dictionary.
#Bbbb vvvvvv code#
So right now i am facing the following problems:ġ)lines that are not present in either replace.csv or delete.csv dont get printedĢ)there is a possibility that my input.csv may contain newlines within one entry so reading line by line is a problem,however it is a certainty that the data distributed on the different lines is between quotes.Īny help in bringing the code and my logic together is appreciated. My logic is: 1)open input.csv read line by lineģ)compare first element with entire delete.csvĤ)if found in delete.csv then do nothing and take next line in arrayĥ)if not found in delete.csv then compare with replace.csvĦ)if the first element is found in the first column of replace.csv then replace the element by the corresponding second column of replace.csv and the second element with the corresponding 3rd third column of repalce.csv.ħ)load this array into a bigger 10 element array. Input.csv: aaaaaaaa,bbbbbb,cccccc,ddddddd Although the next time he face the Starjammers he managed to consume Raza.I am writing a python code to search,delete and replace columns in a csv file ZZZXX and his fellow teammates failed their first mission. Their first mission was to kill Vulcan's brother Havok and the Starjammers. Xenith of the Strontian race was once heroic warrior, and now she only sought to bring vengeance down upon the head of her cousin Kallark.

Hodinn once served on the Guard before Cassandra Nova, although it seems that now, it only wants to burn. Pn'zo was captured by the Shi'ar while attempting to rob a bank.

#Bbbb vvvvvv android#
Pn’zo appears to be an android being of some kind. Fooled, the insanely terrified Uncreated exploded their ships rather than confront the idea they were still inferior to their creator. It somehow survived the mass suicide caused by the Starjammers, using mirror-throwers to create a sensor-fooling construct of their dead god. The list also included an unnamed survivor of the Uncreated invasion of the Shi'ar. After the psychopathic mutant Vulcan took control of the Shi'ar, he ordered Imperial Guardsmen, Oracle and Nightside to compose his a list of prisoners on the planet, so that he could assure that his Guard was loyal only to him. ZZZXX was imprisoned on the Shi'ar prison planet of Kr'kn to be studied by D'Ken Neramani, but after his death the Symbiote just remained locked away. This behavior was different from the other known Symbiotes that bonded to their host in order to survive. This monstrosity fed on people by eating their brains. ZZZXX was a member of an unknown Symbiote race.
