Home > Enterprise >  Efficient way to know region of a coordinate
Efficient way to know region of a coordinate

Time:05-07

everyone, I want to know if there is an efficienct way to know if a coordinate locate in a region. Just like picture below. I want to know each coordinate locate which region below table and get corresponding feature. enter image description here

CodePudding user response:

the expected output looks like this. enter image description here

CodePudding user response:

I think you want

for s in bladderselecteddf.TSS_Start_Site:
    genes = refdf[ (s >= refdf.Start) & (s <= refdf.End) ].gene_name

From your question, it is a little difficult to figure out exactly what you want.

  • Related