Re: what is happening in panda "where" clause

2017-09-23 Thread Pavol Lisy
On 9/22/17, Peter Otten <__pete...@web.de> wrote: > Exposito, Pedro (RIS-MDW) wrote: > >> This code does a "where" clause on a panda data frame... >> >> Code: >> import pandas as pd; >> col_names = ['Name', 'Age', 'Weight', "Education"]; >> # create panda dataframe >> x = pd.read_csv('test.dat',

Re: what is happening in panda "where" clause

2017-09-22 Thread Peter Otten
Exposito, Pedro (RIS-MDW) wrote: > This code does a "where" clause on a panda data frame... > > Code: > import pandas as pd; > col_names = ['Name', 'Age', 'Weight', "Education"]; > # create panda dataframe > x = pd.read_csv('test.dat', sep='|', header=None, names = col_names); >

what is happening in panda "where" clause

2017-09-22 Thread Exposito, Pedro (RIS-MDW)
This code does a "where" clause on a panda data frame... Code: import pandas as pd; col_names = ['Name', 'Age', 'Weight', "Education"]; # create panda dataframe x = pd.read_csv('test.dat', sep='|', header=None, names = col_names); # apply "where" condition z = x[ (x['Age'] == 55)