I am new to data processing using CSV module. And i have input file
And using this code`
import csv
path1 = "C:\\Users\\apple\\Downloads\\Challenge\\raw\\charity.a.data"
csv_file_path = "C:\\Users\\apple\\Downloads\\Challenge\\raw\\output.csv.bak"
with open(path1, 'r') as in_file:
in_file.__next__()
stripped = (line.strip() for line in in_file)
lines = (line.split(":$%:") for line in stripped if line)
with open(csv_file_path, 'w') as out_file:
writer = csv.writer(out_file)
writer.writerow(('id', 'donor_id','last_name','first_name','year','city','state','postal_code','gift_amount'))
writer.writerows(lines)
Is it possible to remove (:) in the first and last column of csv file. And i want output be like
Please help me.

gift_amountcolumn has commas (,) in the values, which means your dataset has to be tab (or something else other than comma) separated. As @Artagel said, please provide some code of what you have done so far.