python - Conditionally changing value in a cell based on value in another cell Pandas -


i trying apply condition changing values of cells based on value of cell in same column. data frame reads below:

    sample_name  c14-cer_mean  c16-cer_mean  c18-cer_mean  c18:1-cer_mean  0          1 1      0.124749      0.285659     35.302029        8.173144    1         1 10      0.332976      0.656197     39.220933        6.446620    2         1 13      0.227423      0.272440     26.866943        5.763723    3         1 14      0.128359      0.604903     29.848169        6.801633    4          1 5      0.204000      0.242652     21.354158        4.637632    5          1 6      0.122697      0.412868     25.168258        5.866785    6          1 9      0.161679      0.569781     28.707720        6.525267    7        blank      0.408713      0.526573      0.531430        0.111025   

i want check if values in different rows (sample_name) columns c14-cer_mean c16-cer_mean c18-cer_mean c18:1-cer_mean lower 2x value of corresponding "blank" , if - change them 0. what'd best way in pandas?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -