Sujet : help: pandas and 2d table
De : nospam (at) *nospam* please.ty (jak)
Groupes : comp.lang.pythonDate : 12. Apr 2024, 19: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.