title: Fill NA values in Pandas Dataframe using Collaborative Filtering
body: <p>I am working on a database of Organic Compounds, and some of the cells have NA values (look at the HFUS column in the second pic):</p>
  
  <p><a href="https://i.stack.imgur.com/H0VEv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H0VEv.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/4pAXq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4pAXq.png" alt="enter image description here"></a></p>
  
  <p>For the purposes of my project, I would like to fill these blank spaces using collaborative filtering, instead of simple mean or median imputation. That is, for the column whose NA value will be filled, we are supposed to find the most similar row(s) comprising the other columns, and then fill in that attribute from those rows. I would like to do this recursively and fill in all the NA values. </p>
  
  <p>How do I go about doing this? I found code to do a corr() with the other columns in <a href="http://tungwaiyip.info/2012/Collaborative%20Filtering.html" rel="nofollow noreferrer">this link</a> , but I could not get much past creating the corr values. </p>
  
  <p>Here's the CSV (33kb) that can be loaded to Pandas: <a href="https://www.dropbox.com/s/8e6bvqev5u0ainj/features.csv?dl=0" rel="nofollow noreferrer">features.csv</a></p>