I facing the issue that I need only a subset of a my original dataframe that is distributed over different rows and columns. E.g.:
# My Original dataframe
import pandas as pd
dfTest = pd.DataFrame([[1,2,3],[4,5,6],[7,8,9]])
Output:
0 1 2
0 1 2 3
1 4 5 6
2 7 8 9
I can provide a list with rows and column indices where my desired values are located:
array_indices = [[0,2],[1,0],[2,1]]
My desired output is a series:
3
4
8
Can anyone help?