[SciPy-User] How to read row_name, col_name, value format TSV into a sparse matrix?
Thomas Kluyver
takowl at gmail.com
Wed Jan 29 04:56:45 EST 2020
On Wed, 29 Jan 2020 at 09:34, Peng Yu <pengyu.ut at gmail.com> wrote:
> Where it documented that pandas.read_csv don't generate the whole
> matrix? The return value is either of the two?
>
It returns a 2D data structure as in the rows and columns of your CSV file
- so the shape will be (3, n_entries). It doesn't try to interpret them as
referring to entries in a matrix - you have to do that as a separate step.
It's probably not exactly documented like this, because documentation
doesn't usually say what a function *doesn't* do, unless it's a very common
confusion.
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20200129/e920cbca/attachment.html>
More information about the SciPy-User
mailing list