title: Data cleaning in a csv file using python
body: <p>Hi I am working on a csv file having several columns. One particular column is address which is in the below format - </p>
  
  <p>10515, 115th Place Northeast, Juanita, Kirkland, King County, Washington, 98033, United States of America</p>
  
  <p>I want to split each column based on (,) and create new relevant columns for each like Unit, Street, state, post code etc...</p>
  
  <p>I was able to split them based on (,) and now I have one column for each split. </p>
  
  <p>The problem is that this data is not consistent, the total columns that I get after split is 10. But the data is not in the same order. Some records are like the following - </p>
  
  <p>3008, 38th Avenue Southwest, West Seattle, Seattle, King County, Washington, 98126, United States of America</p>
  
  <p>23098, Northeast 130th Street, Trilogy, Union Hill-Novelty Hill, Novelty, King County, Washington, 98053, United States of America</p>
  
  <p>Fire Station 34, 633, 32nd Avenue East, Broadmoor, Washington Park, Seattle, King County, Washington, 98112, United States of America</p>
  
  <p>Basically, not each record will have all the 10 kinds of information and not necessarily in the same order. </p>
  
  <p>What should be the best approach to clean this type of data? I want to eventually have the data put in the relevant column according to what they represent, like if city go under city column, if postcode move to postcode columns etc.</p>
  
  <p>I am using Python 2.0.</p>
  
  <p>Hoping to get a good solution. Thanks!</p>