Reputation: 1
I am new to python and I'm taking a machine learning course. I have few experience of GraphLab and SFrames. I'd like to know how to apply a conditional and logical operation in case of data stored as SFrames. The following code and output might help to understand the problem:
import graphlab as gl
data_1 = gl.Sframe("home_data.gl/')
It has a integer column named 'sqft_living'. I want to find all the values that lie between 2000 to 4000 sqft in this specific column.
Can anyone please suggest how to implement it?
Upvotes: 0
Views: 227
Reputation: 411
The code below will work fine for filtering:
x = data_1[(data_1['sqft_living']>=2000) & (data_1['sqft_living'] <=4000)]
The filtered data will be stored in x.
Upvotes: 0