Given a dataframe and a list, with the values of a column of a dataframe. (the list is equaly long as the rows of the dataframe and each value appear exactly ones) How can i sort the rows in the dataframe according to the order in the list?
import pandas as pd
df = pd.DataFrame({'user': ['Bob', 'Jane', 'Alice'],
'income': [40000, 50000, 42000]})
z = ["Jane", "Alice", "Bob"]