Horje
how to replace a word in csv file using python Code Example
how to replace a word in csv file using python
import csv

inputfile = csv.reader(open('civil-war-battles.csv','r'))
outputfile = open('placelist.txt','w')

i=0

for row in inputfile:
    place = row[2].replace(' ,',',')
    print place
    outputfile.write(place+'\n')
    i+=1




Python

Related
seaborn axis limits Code Example seaborn axis limits Code Example
draw a single pixel using pygame Code Example draw a single pixel using pygame Code Example
python convert querydict to dict Code Example python convert querydict to dict Code Example
frequency count of values in pandas dataframe Code Example frequency count of values in pandas dataframe Code Example
get active window title python Code Example get active window title python Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8