title: How could I transfer each cell to different form then separate them to 2 cells ? CSV python
body: <p>I have a number.csv file and each cell contain one digit. For example, it looks like this..</p>
  
  <pre><code>    0,1,2 
     -1,0,1
      1,2,-1
  </code></pre>
  
  <p>Then I'd like to transform each digit to a certain name according to my rule. </p>
  
  <pre><code>   # The rule is: 
     # 0 for AA
     # 1 for AB
     # 2 for BB
     # -1 for 00 (that's double zero)
  </code></pre>
  
  <p>Therefore I will get something like...</p>
  
  <pre><code>   AA,AB,BB
     00,AA,AB
     AB,BB,00
  </code></pre>
  
  <p>Then I have to divide each cell to two cells, and write into a new result.csv file. Finally it would look like....</p>
  
  <pre><code>   A,A,A,B,B,B
     0,0,A,A,A,B
     A,B,B,B,0,0  
  </code></pre>
  
  <p>I only know how to replace each digit to a certain name (eg. 0 to AA), then I stuck at how to divide AA to A,A for each cell and separate each row to next line.  </p>
  
  <p>Does anyone know how to work out this problem by csv module or even a smarter way to achieve this?  </p>
  
  <p>Much appreciated, </p>