Sujet : Re: help: pandas and 2d table
De : nospam (at) *nospam* please.ty (jak)
Groupes : comp.lang.pythonDate : 13. Apr 2024, 22:35:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <uvetru$375r4$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.2
Stefan Ram ha scritto:
df = df.where( df == 'zz' ).stack().reset_index()
result ={ 'zz': list( zip( df.iloc[ :, 0 ], df.iloc[ :, 1 ]))}
Since I don't know Pandas, I will need a month at least to understand
these 2 lines of code. Thanks again.