filtering a dataframe pandas code example
Example 1: pandas column filter
filter = df['column']!= 0
df = df[filter]
Example 2: pandas filter
>continents = ['Asia','Africa', 'Americas', 'Europe']
>gapminder_Ocean = gapminder[~gapminder.continent.isin(continents)]
>gapminder_Ocean.shape
(24,6)