-2

what is the difference between as_matrix() and to_numpy() methods? I know that both are used to convert pandas dataframe into numpy ndarray, but what is the difference between these 2 methods?

Sampath
  • 1
  • 1
  • 2
    One is deprecated, the other is not. [Reference](https://stackoverflow.com/a/54508052/4909087). – cs95 Nov 14 '19 at 23:08

1 Answers1

0

I guess as_matrix() is confusing sometimes compared with Numpy metrix, then was deprecated. AS to what we get is Numpy-array from .as_matrix(), instead of Numpy-matrix. As for the defference bwt numpy narrays and nmpy matrices, hear is a good answer by unutbu.

Sean.H
  • 640
  • 1
  • 6
  • 18