Here's a Python API solution using the pyvcf submodule I wrote:
>>> from fuc import pyvcf
>>> data = {
... 'CHROM': ['chr1', 'chr1'],
... 'POS': [100, 101],
... 'ID': ['.', '.'],
... 'REF': ['G', 'T'],
... 'ALT': ['A', 'C'],
... 'QUAL': ['.', '.'],
... 'FILTER': ['.', '.'],
... 'INFO': ['.', '.'],
... 'FORMAT': ['GT:DP', 'GT:DP'],
... 'A': ['0/1:30', '0/1:29'],
... 'B': ['0/1:24', '0/1:30'],
... 'C': ['0/1:18', '0/1:24'],
... }
>>> vf = pyvcf.VcfFrame.from_dict([], data)
>>> # vf = pyvcf.VcfFrame.from_file('in.vcf')
>>> vf.df
CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A B C
0 chr1 100 . G A . . . GT:DP 0/1:30 0/1:24 0/1:18
1 chr1 101 . T C . . . GT:DP 0/1:29 0/1:30 0/1:24
>>> a_vf = vf.subset('A')
>>> a_vf.df
CHROM POS ID REF ALT QUAL FILTER INFO FORMAT A
0 chr1 100 . G A . . . GT:DP 0/1:30
1 chr1 101 . T C . . . GT:DP 0/1:29
>>> a_vf.to_file('A.vcf')
Splitting vcf files to individual samples