I have an Index array ind
and a DataFrame df
. Now I want to filter df
to show only those lines where the value in col1
(which is a regular column, no index) is contained in the array ind
. How do I do that?
Asked
Active
Viewed 13 times
0

principal-ideal-domain
- 3,998
- 8
- 36
- 73
-
1`out = df.loc[df['col1'].isin(ind)]` – mozway Jan 12 '23 at 09:20