title: How to fix AttributeError: 'list' object has no attribute 'replace' when I try to replace some text in a csv read
body: <p>I try to replace a text in csv read with some data dictionary, but I got an Error.</p>
  
  <pre class="lang-py prettyprint-override"><code>import csv
  
  dataset = open('../sentimenprabowo.csv', 'r')
  sentiment = csv.reader(dataset, delimiter=',')
  
  newDok = open('../sentimenprabowopreproses.csv', 'w')
  save = csv.writer(newDok)
  
  data= open("convertcsv.json", "r")
  APPOSTOPHES=data.read()
  
  new_sentence = []
  for row in sentiment:     
      print(row)
      for candidate_replacement in APPOSTOPHES:                
          if candidate_replacement in row:            
              #print(candidate_replacement)
              row = row.replace(candidate_replacement, APPOSTOPHES[candidate_replacement])
      new_sentence.append(row)
  rfrm = "".join(new_sentence)
  print(rfrm)
  </code></pre>
  
  <p>I  hope this can be replace all the text in my csv who same text with data dictionary (correction spelling).</p>
  
  <p>but the result is error: </p>
  
  <pre><code>  File "readdata.py", line 45, in &lt;module&gt;
      row = row.replace(candidate_replacement, APPOSTOPHES[candidate_replacement])
  AttributeError: 'list' object has no attribute 'replace'
  </code></pre>
  
  <p>help me please...</p>
  
  <p>this is my convertcsv.json file:</p>
  
  <pre><code>{"@":"di","ababil":"abg labil","abis":"habis","acc":"accord","ad":"ada","adlah":"adalah"}
  </code></pre>