Subsetting cells based on gene expression

Hi,

I would like to select and subset a certain fraction of my cells based on the expression of a certain marker/set of marker genes. I would appreciate any information as to how to achieve that best.

Many thanks.

anndata_subset = anndata[anndata[: , ‘GENE’].X > 0.5, :]