here is the case need to ask your advice.
I have a dataframe as below by using line
df = pd.DataFrame(np.arange(1,400,10).reshape(10, 4), columns=['A', 'B', 'C', 'D'])
df
Then, I have a list as following:
array([ 331, 51, 131, 211])
I would like to get a table with column B only contains the values stated in the list. For instance, I generate the expected output manually as below:
Thank you for your advice in advance. Thanks!