Answers for "pandas dataframe filter index by list"

0

filter dataframe by index

Filter_df  = df[df.index.isin(my_list)]
Posted by: Guest on July-27-2021
0

filter dataframe with a list of index

df[df.index.isin([1,3])]
Posted by: Guest on June-26-2020

Code answers related to "pandas dataframe filter index by list"

Browse Popular Code Answers by Language