I have a csv file. each value is quoted with """
quotes . I want to remove it for further processing
here is my csv file
Name,age,class,place
""""ishika""","""21""","""B"""","""Whitefield"""
"""anju""","""23""","""C""","""ITPL"""
I want the output as:
Name,age,class,place
ishika,21,B,Whitefield
anju,23,C,ITPL
I am getting csv form postgres table..
import psycopg2
import config as cfg
conn = cfg.DATABASE_CONNECT
cur = conn.cursor()
import csv
import pandas as pd
import numpy as np
tablename = "sf_paymentprofile_error_log"
query = "SELECT * from {} ".format(tablename)
outputquery = "COPY ({0}) TO STDOUT WITH CSV HEADER".format(query)
with open(cfg.PG_EXTRACT_PATH+'sf_paymentprofile_error_log.csv', 'w') as f:
cur.copy_expert(outputquery, data)
conn.commit()
conn.close()
I want the above output using python.Thanks.