title: Dropping rows in a pandas dataframe
body: <p>I have a problem that I have been dealing with 2 days now, and even though I read the documentation and answers to similar questions on StackOverflow, I cannot come with a solution. </p>
  
  <p>I have a dataset with pairs of questions, witch I should label with duplicate or not. On the training dataset, I implemented cleaning and vectorization - word2vec. Unfortunately, for some rows word2vec returns emply value (nan), as they don't have any words after cleaning. </p>
  
  <p>So, I'm trying to drop this lines, but it simply do not work. </p>
  
  <pre><code>LEN = len(train1)
  print("Innitial lenght: ")
  print(len(train1))
  print("Empty rows: ")
  for i in range(0, LEN): 
      if ((type(train1['q1_vec'][i]) != np.ndarray) or (type(train1['q2_vec'][i])!= np.ndarray)): 
          print(i)
          train1.drop(train1.index[i])
  print("Lenght after cleaning")
  print(len(train1))
  </code></pre>
  
  <p>I got the results: </p>
  
  <pre><code>Innitial lenght: 
    258528
  Empty rows: 
    29296
    59523
    80284
    ...
    219103
  Lenght after cleaning
    258528
  </code></pre>
  
  <p>Which means I have not drop anything and I cannot apply any function of distance, such as <code>scipy.spatial.distance.euclidean</code> etc. </p>
  
  <p>I tried with Lambda function, but also did not succeed.</p>
  
  <pre><code>train1['euclidean'] = train1.apply(lambda row: dist.euclidean(row['q1_vec'], row['q2_vec']) if ((type(row['q1_vec']) == np.ndarray) or (type(row['q2_vec']) == np.ndarray)) else None, axis=1)
  </code></pre>
  
  <p>Any suggestions? </p>