I have a series A, e.g. 1.3, 4.5, 10.11
and a series B 0.8, 5.1, 10.1, 0.3
, and I would like to get a series C with the closest number from A for every element in B: 1.3, 4.5, 10.11, 1.3
btw, if it simplifies things the closest
number from A can be the closest number larger than the number in B, so the answer can also be 1.3, 10.11, 10.11, 1.3
related to How do I find the closest values in a Pandas series to an input number?