Using if else on a dataframe across multiple columns
问题 I have a large dataset of samples with descriptors of whether the sample is viable - it looks (kind of) like this, where 'desc' is the description column and 'blank' indicates the sample is not viable: desc x y z 1 blank 4.529976 5.297952 5.581013 2 blank 5.906855 4.557389 4.901660 3 sample 4.322014 4.798248 4.995959 4 sample 3.997565 5.975604 7.160871 5 blank 4.898922 7.666193 5.551385 6 blank 5.667884 5.195825 5.232072 7 blank 5.524773 6.726074 4.767475 8 sample 4.382937 5.926217 5.203737 9