Re: How to read row_name, col_name, value format TSV into a sparse matrix?
Thomas Kluyver <[email protected]> Wed, 29 Jan 2020 09:56:45 +0000
| Newsgroups | gmane.comp.python.scientific.user |
|---|---|
| Message-ID | <CAOvn4qgD2M2reNA1QD8aSA2DFtKnnng=1Rp_vB8yUCVkHi4PUg@mail.gmail.com> |
On Wed, 29 Jan 2020 at 09:34, Peng Yu <[email protected]> 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 _______________________________________________ SciPy-User mailing list [email protected] https://mail.python.org/mailman/listinfo/scipy-user