Re: How to read row_name, col_name, value format TSV into a sparse matrix?

Hjalmar Turesson <[email protected]> Tue, 28 Jan 2020 22:36:13 -0500
Newsgroups gmane.comp.python.scientific.user
Message-ID <CAA7EFhSqv5Bt-rFdmYvZ-Shn9VVyeHBT5wYpEskRPs-YP2y8cQ@mail.gmail.com>
Have you tried using Pandas?

https://pandas.pydata.org/pandas-docs/stable/user_guide/sparse.html

On Tue, Jan 28, 2020 at 10:09 PM Peng Yu <[email protected]> wrote:

> Suppose that I have a TSV file in the following format.
>
> ```
> row_name<TAB>col_name<TAB>value
> ```
>
> Is there an easy way to read it into a sparse matrix format in scipy?
> Thanks.
>
> I don't see such examples in the doc.
>
> https://docs.scipy.org/doc/scipy/reference/sparse.html
>
> --
> Regards,
> Peng
> _______________________________________________
> SciPy-User mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/scipy-user
>

_______________________________________________
SciPy-User mailing list
[email protected]
https://mail.python.org/mailman/listinfo/scipy-user