It is possible to extract raster data values between 20th and 80th percentile using python?
Definitely... It will be a nested query however ... details of course, will depend upon how your data are structured and whether you have the cumulative distribution or just the relative frequencies.