Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

filter dataframe site:stackoverflow.com

df = pd.DataFrame(np.random.randn(30, 3), columns=['a','b','c'])
df_filtered = df.query('a > 0').query('0 < b < 2')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #filter #dataframe
ADD COMMENT
Topic
Name
5+2 =