简体   繁体   中英

GraphLab and SFrames

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM