I have dataframe A that is 43,249 rows x 10 cols. I have a list of random indices. I want to extract into their own dataframe. I have looked at other methods, and they do not seem to work.
I have tried:
list = [1 5 6 9 11 17 ... 564 985 2545...]
dfB = dfA.pop(list)
and
dfB = dfA.drop(list)
and
dfB = dfA.loc(list)
TypeError: unhashable type: 'list'
I thought you could do this without a for loop.