help: pandas and 2d table

Liste des GroupesRevenir à cl python 
Sujet : help: pandas and 2d table
De : nospam (at) *nospam* please.ty (jak)
Groupes : comp.lang.python
Date : 12. Apr 2024, 20:40:09
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uvbv6a$2gmc4$1@dont-email.me>
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.2
Hi everyone.
I state that I don't know anything about 'pandas' but I intuited that
it could do what I want. I get, through the "read_excel" method, a
table similar to this:
       obj| foo1 foo2 foo3 foo4 foo5 foo6
       -----------------------------------
      foo1|   aa   ab   zz   ad   ae   af
          |
      foo2|   ba   bb   bc   bd   zz   bf
          |
      foo3|   ca   zz   cc   cd   ce   zz
          |
      foo4|   da   db   dc   dd   de   df
          |
      foo5|   ea   eb   ec   zz   ee   ef
          |
      foo6|   fa   fb   fc   fd   fe   ff
And I would like to get a result similar to this:
{
     'zz':[('foo1','foo3'),
           ('foo2','foo5'),
           ('foo3','foo2'),
           ('foo3','foo6'),
           ('foo5','foo4')
          ]
}
Would you show me the path, please?
Thank you in advance.

Date Sujet#  Auteur
12 Apr 24 * help: pandas and 2d table10jak
12 Apr 24 `* Re: help: pandas and 2d table9Stefan Ram
13 Apr 24  `* Re: help: pandas and 2d table8jak
13 Apr 24   +- Re: help: pandas and 2d table1Mats Wichmann
13 Apr 24   `* Re: help: pandas and 2d table6Tim Williams
13 Apr 24    `* Re: help: pandas and 2d table5Stefan Ram
13 Apr 24     `* Re: help: pandas and 2d table4jak
14 Apr 24      `* Re: help: pandas and 2d table3Stefan Ram
15 Apr 24       +- Re: help: pandas and 2d table1jak
19 May 24       `- Re: help: pandas and 2d table1Stefan Ram

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal