I have the easiest problem to implement, but so far I have not been able to find a solution in Python.
I built a table that looks like this:
501 - ASIA 1262 - EUROPE 3389 - LATAM 5409 - US
I will conduct a certain value to see if it falls into these ranges, 389 -> ASIA, 1300 -> LATAM, 5400 -> US . A value greater than 5409 should not return a search value.
Usually I have a one-to-one match and implement a search dictionary.
But in this case, I must consider these ranges, and I do not see my way out of the problem.
Perhaps without providing the whole solution, could you give some comments that will help me to look in the right direction?
It is very similar to a vlookup in a spreadsheet.
I would describe my knowledge of Python as somewhere between basic and intermediate.
source share