Re: Extracting dataframe column with multiple conditions on row values

2022-01-09 Thread Edmondo Giovannozzi
dft.values == key1 ]second = first[first.values == key2 > ]print(second[2]) > I get a 6 as an answer and suppose it could be done in one more complex > expression if needed! LOL! > -Original Message- > From: Edmondo Giovannozzi > To: pytho...@python.org > Sent: Sat, Jan 8, 2022

Re: Extracting dataframe column with multiple conditions on row values

2022-01-08 Thread Avi Gross via Python-list
print(second[2]) I get a 6 as an answer and suppose it could be done in one more complex  expression if needed! LOL! -Original Message- From: Edmondo Giovannozzi To: python-list@python.org Sent: Sat, Jan 8, 2022 8:00 am Subject: Re: Extracting dataframe column with multiple conditions

Re: Extracting dataframe column with multiple conditions on row values

2022-01-08 Thread Edmondo Giovannozzi
Il giorno sabato 8 gennaio 2022 alle 02:21:40 UTC+1 dn ha scritto: > Salaam Mahmood, > On 08/01/2022 12.07, Mahmood Naderan via Python-list wrote: > > I have a csv file like this > > V0,V1,V2,V3 > > 4,1,1,1 > > 6,4,5,2 > > 2,3,6,7 > > > > And I want to search two rows for a match and find th

Re: Extracting dataframe column with multiple conditions on row values

2022-01-07 Thread dn via Python-list
Salaam Mahmood, On 08/01/2022 12.07, Mahmood Naderan via Python-list wrote: >I have a csv file like this >V0,V1,V2,V3 >4,1,1,1 >6,4,5,2 >2,3,6,7 > >And I want to search two rows for a match and find the column. For >example, I want to search row[0] for 1 and row[1] fo

Extracting dataframe column with multiple conditions on row values

2022-01-07 Thread Mahmood Naderan via Python-list
Hi I have a csv file like this V0,V1,V2,V3 4,1,1,1 6,4,5,2 2,3,6,7 And I want to search two rows for a match and find the column. For example, I want to search row[0] for 1 and row[1] for 5. The corresponding column is V2 (which is the third column). Then I