What is the best solution to pick up value from rigth column based on range in left column? What is best not to use heavy loops: numpy array, pandas series, dict, list. Data itself in Dataframe and ranges are bigger that in the example. And not only one value it could be a row with many values.
There is an Excel file that shows the tariffs for transportation depending on various conditions. Tariffs change quarterly, in this file. Old data is overwritten. Therefore, the format must be left for automatic loading into Dataframe. It is necessary to select the desired line with the tariff depending on the distance. For example For 74 km I should pick up 6955,00 if condition 1.
source https://stackoverflow.com/questions/70896761/what-is-the-best-solution-to-pick-up-value-from-rigth-column-based-on-range-in-l
Comments
Post a Comment