User Tools

Site Tools


basic_filters

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

basic_filters [2016/10/07 15:46] (current)
vincenzo created
Line 1: Line 1:
 +  * Grab rows where columns has certain values
 +<code python>
 +valuelist = ['​value1',​ '​value2',​ '​value3'​]
 +df = df[df.column.isin(valuelist)]
 +</​code>​
 +
 +  * Select using criteria from multiple columns
 +<code python>
 +df[(df['​column_one'​]>​2004) & (df['​column_two'​]==9)]
 +</​code>​
  
basic_filters.txt ยท Last modified: 2016/10/07 15:46 by vincenzo