I have a df that looks like this:
AF | GT | Sample_name |
---|---|---|
0.001 | 1/1 | path/to/sample/name/ID0001.vcf.gz |
0.005 | 0/1 | path/to/sample/name/ID0002.vcf.gz |
What I want is to only keep the ID name in the Sample_name column:
AF | GT | Sample_name |
---|---|---|
0.001 | 1/1 | ID0001 |
0.005 | 0/1 | ID0002 |
I would very much appreciate any help in achieving this.