I have a pandas Series instance defined as follows:
import pandas as pd
timestamps = [1,2,3,4,5,6,7,8,9,10]
quantities = [1,9,6,6,6,4,4,4,5,2]
series = pd.Series(quantities, index=timestamps)
Is it possible to supply an array of index values and retrieve the quantities at them? And if it is, what's the fastest way of achieving this, please?
For example, if I supply:
timestamps = [1,1,1,4]
I expect the following back from series:
quantities = [1,1,1,6]
Thanks for any help here.