title: why am i getting random NAN values
body: <p>I have a dataframe that is shift 48 values. </p>
  
  <p>I check the <code>numpy</code> array and it seems fine: by that I mean it is shifted 48 places. Now I want to split the data of the dataframe to a 70:30 ratio so that all the lines with <code>nan</code> values are in the 30 percent part.</p>
  
  <p>Now when I print <code>x_train</code> I get some of the lines with <code>nan</code> values for some reason but I can't seem to figure what is wrong with my code.</p>
  
  <p><strong>PS</strong> data is a dataframe provided by the api used and does not provide <code>nan</code> values </p>
  
  <pre><code>df = pd.DataFrame(data)
  
  ## the index is the date and the columns are as prediction,strength,k,g,w
  x = np.array(dff.drop(['prediction','strength','g'],1))
  y = np.array(dff.drop(['prediction','strength','k'],1))
  
  x_train, x_test, y_train,t_test = train_test_split(x,y, test_size=0.3)
  </code></pre>
  
  <p>When I try to print <code>x_train</code> I get the values I need but some of them are <code>nan</code> values for <code>'strength'</code> and <code>'g'</code>. </p>
  
  <p>I am spliting the data the right way and after spliting the data does it get sorted in any way.</p>
  
  <p>part of <code>x_train</code> output:</p>
  
  <pre><code>[78.90399933         nan         nan]
  [75.04682159 8.51200104 8.16529846]
  [78.07499695         nan         nan]
  [81.23899841 9.76999664 9.13999939]
  [80.60099792 8.34100342 8.07700348]
  [79.50131226         nan         nan]
  [72.7118988  4.44860077 7.51000214]
  [79.55729675         nan         nan]
  [74.17259979 5.2460022  7.83300018]
  [74.11289978 4.3219986  7.40000153]
  [79.62058258         nan         nan]
  </code></pre>
  
  <p>My request is to output the data without the <code>nan</code> values.</p>