I have this data frame:
CHROM POS ID 162014 162015 162016
1 1645 M1 0|1:0.96 0|0:0 0|0:0.33
1 23253 M3 1|1:1.97 0|0:0 0|0:0.33
1 29491 M4 1|1:1.97 0|0:0 0|0:0.33
1 30698 M6 0|0:0.03 1|0:1 1|1:1.67
1 43616 M9 0|0:0.03 1|1:2 1|1:1.67
1 53188 M11 1|1:1.97 0|0:0 0|0:0.33
1 53632 M12 1|1:1.97 0|0:0 0|0:0.33
1 57628 M13 1|1:1.97 0|0:0 0|0:0.33
1 59879 M14 0|0:0.03 1|1:2 1|1:1.67
1 64576 M15 0|0:0.03 1|1:2 1|1:1.67
I want to know, how can I remove all characters and numbers after 0|0, 0|1, 1|0, and 1|1 in all columns except for ID,#CHR, and POS columns in pandas, same as this table;
#CHROM POS ID 162014 162015 162016
1 1645 M1 0|1 0|0 0|0
1 23253 M3 1|1 0|0 0|0
1 29491 M4 1|1 0|0 0|0
1 30698 M6 0|0 1|0 1|1
1 43616 M9 0|0 1|1 1|1
1 53188 M11 1|1 0|0 0|0
1 53632 M12 1|1 0|0 0|0
1 57628 M13 1|1 0|0 0|0
1 59879 M14 0|0 1|1 1|1
1 64576 M15 0|0 1|1 1|1