I count statistics for the dataset, and I want to filter columns that contain specific strings. How I could do it with regex?
Here in volumes_c
I filtered some structures, that have Volume in there names
Select_list = ["Amygdala", "Hippocampus", "Lateral-Ventricle", "Pallidum", "Putamen", "Thalamus", "Caudate"]
Side = ["Left", "Right"]
#Selected columns
if(Select_list):
for s in Side:
for struct in Select_list:
volumes_c = group_c.filter(regex="^(?=.*"+s+")(?=.*"+struct+")(?=.*Volume)")
Now i want to filter columns that contain SurfArea
in: