dfply
dfply copied to clipboard
Filtering two or more elements from a column
Hi, I am new to piping but I really want to start working using pipes.
I have a dataframe in which one of the column is country names. I want to mask only few countries. I know we can do this if I want only one element. (df_world >> mask(X.Country=='Nigeria')).
But how do I select multiple countries from a column. For example, I want 'Nigeria' and 'China' only?