title: How do 'numpy.ndarray' object do not 'numpy.ndarray' object?
body: <p>When you call DataFrame.to_numpy(), pandas will find the NumPy dtype that can hold all of the dtypes in the DataFrame. But how to perform the reverse operation?</p>
  
  <p>I have an 'numpy.ndarray' object 'pred'. It looks like this:</p>
  
  <blockquote>
    <p>[[0.00599913 0.00506044 0.00508315 ... 0.00540191 0.00542058 0.00542058]]</p>
  </blockquote>
  
  <p>I am trying to do like this:</p>
  
  <pre><code> pred = np.uint8(pred)
   print("Model predict:\n", pred.T)
  </code></pre>
  
  <p>But I get:</p>
  
  <blockquote>
    <p>[[0 0 0 ... 0 0 0]]</p>
  </blockquote>
  
  <p>Why, after the conversion, I do not get something like this:</p>
  
  <blockquote>
    <p>0     0     0     0     0     0  ...     0     0     0     0     0     0</p>
  </blockquote>
  
  <p>And how to write the pred to a file?</p>
  
  <pre><code>pred.to_csv('pred.csv', header=None, index=False)
  pred = pd.read_csv('pred.csv', sep=',', header=None)
  </code></pre>
  
  <p>Gives an error message:</p>
  
  <pre><code>AttributeError                            Traceback (most recent call last)
  &lt;ipython-input-68-b223b39b5db1&gt; in &lt;module&gt;()
  ----&gt; 1 pred.to_csv('pred.csv', header=None, index=False)
        2 pred = pd.read_csv('pred.csv', sep=',', header=None)
  AttributeError: 'numpy.ndarray' object has no attribute 'to_csv'
  </code></pre>
  
  <p>Please help me figure this out.</p>