<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Getting Started with Python and GraphLab Create
Python is a popular high-level programming language. It's a simple language, designed with an emphsis on code readability. If you already have programming experience, Python is easy to learn.
Installing GraphLab and Python
Follow these detailed instructions to install GraphLab Create and Python
Step1:  In Python single line comments are started with a <b>#</b>.
Step2:  Python doesn't actually have built in support of multiline comments. However this can be done by just creating a multine string and not setting it equal to anything. Multiline string are started and ended with three single quotes or three double quotes. (Single and double quotes are equivant in Python.)
Step3:  Python has several built in data types. The simple built in types are called
Step4:  Python has other built in types that are compound types (i.e. types composed of other types). The most common are
Step5:  Tuples are like lists except they are immutable. Strings are also immutable.
Python also has a special type called <b>None</b> which can be set to any data type.
Step6:  You can print the value of variable inside of strings by using the <b>%</b> operator and placing <b>%s</b> inside of the string. For example
Step7:  You create a functions by using the <b>def</b> keyword. Here is an example of a function called <i>add2</i> that takes a value called <i>x</i> return the value of two added to it.
Step8:  Like most programming languages, Python has <b>if</b> and <b>else</b> statements. The <b>elif</b> keyword is used for else-if statements. Unlike a lot of programming language, white space is meaningfull; the body of if-statements must be indented from its test-expression. Python doesn't use braces.
You can use the <b>and</b> and <b>or</b> keywords to string together multipart tests.
Step9:  Python has two types of loops, <b>for</b> loops and <b>while</b> loops.
In a for-loops there is one iteration for each element in the variable. Note that <i>i</i> is the current element, not the index value.
Step10:  While-loops are executed as long as the given expression is True.
Step11:  Notice the use of "+=" to increment. Unlike a lot of programming languages, Python does not have a increment or decrement operator. 
GraphLab Create Basics
First, download and install GraphLab-Create by following these directions
Step12:  Using GraphLab Create, we can easily read in comma seperated file.
Step13:  SFrame basics
Step14:  Suppose we just wanted to look a single column.
Step15:  You can add columns.
Step16:  On the countries, notice that we have two country values that mean the same thing
Step17:  We could also have used a <b>lambda</b> function in the apply. Lambdas are just inline, unamed functions. Lambdas also don't have explict return statements. What the expression evaluates to will be automatically returned
<ASSISTANT_TASK:>
Python Code:
print 'Hello World!'
Explanation: Getting Started with Python and GraphLab Create
Python is a popular high-level programming language. It's a simple language, designed with an emphsis on code readability. If you already have programming experience, Python is easy to learn.
Installing GraphLab and Python
Follow these detailed instructions to install GraphLab Create and Python: https://turi.com/download/install-graphlab-create.html
Once you have have Anaconda, start an IPython session. IPython is a powerful interactive shell for executing Python. You can start an IPython session by running "ipython" from the command line.
This tutorial is written as IPython notebooks. This allows you to download and run the tutorials on your own machine, either as a notebook (.ipynb) or Python file (.py).
Python Basics
Now it time to execute our first Python command. We can use <b>print</b> keyword to print a string.
End of explanation
# this is a comment!
Explanation: In Python single line comments are started with a <b>#</b>.
End of explanation
'''
This is technically just
 a multiline string but
 ususually it's used as a
 multiline comment.
'''
Explanation: Python doesn't actually have built in support of multiline comments. However this can be done by just creating a multine string and not setting it equal to anything. Multiline string are started and ended with three single quotes or three double quotes. (Single and double quotes are equivant in Python.)
End of explanation
b = True                              # bool
s = 'This is a string'                # str
i = 4                                 # int
f = 4.1                               # float
Explanation: Python has several built in data types. The simple built in types are called: bool, str, int, and float. These are just shorthand names for: boolean, string, integer, and floating point number.
Below are examples of creating each type.
End of explanation
d = {'foo': 1, 'bar': 2}              # dict
l = [3,2,1]                           # list
t = (1,2,3)                           # tuple
print d['foo']
print l[2]
print t[1]
Explanation: Python has other built in types that are compound types (i.e. types composed of other types). The most common are: list, dict and tuple. 
dict is just short for dictionary.
Below are examples of creating these types, and accessing their elements.
End of explanation
b = None
s = None
Explanation: Tuples are like lists except they are immutable. Strings are also immutable.
Python also has a special type called <b>None</b> which can be set to any data type.
End of explanation
print "Our float value is %s. Our int value is %s." % (f, i)
Explanation: You can print the value of variable inside of strings by using the <b>%</b> operator and placing <b>%s</b> inside of the string. For example:
End of explanation
def add2(x):
    return x + 2
add2(10)
Explanation: You create a functions by using the <b>def</b> keyword. Here is an example of a function called <i>add2</i> that takes a value called <i>x</i> return the value of two added to it.
End of explanation
if i == 1 and f > 4:
    print "The value of i is 1 and f is greater than 4."
elif i > 4 or f > 4:
    print "i is greater than 4 or f is greateer than 4."
else:
    print "Both i and f are less or equal to 4."
Explanation: Like most programming languages, Python has <b>if</b> and <b>else</b> statements. The <b>elif</b> keyword is used for else-if statements. Unlike a lot of programming language, white space is meaningfull; the body of if-statements must be indented from its test-expression. Python doesn't use braces.
You can use the <b>and</b> and <b>or</b> keywords to string together multipart tests.
End of explanation
for i in l:
    print i
Explanation: Python has two types of loops, <b>for</b> loops and <b>while</b> loops.
In a for-loops there is one iteration for each element in the variable. Note that <i>i</i> is the current element, not the index value.
End of explanation
while i < 10:
    print i
    i += 1
Explanation: While-loops are executed as long as the given expression is True.
End of explanation
import graphlab
Explanation: Notice the use of "+=" to increment. Unlike a lot of programming languages, Python does not have a increment or decrement operator. 
GraphLab Create Basics
First, download and install GraphLab-Create by following these directions: https://turi.com/download/
In order to use another library, you first need to <b>import</b> that library. Like so:
End of explanation
sf = graphlab.SFrame.read_csv('https://static.turi.com/datasets/coursera/toy_datasets/people-example.csv')
Explanation: Using GraphLab Create, we can easily read in comma seperated file.
End of explanation
sf # you can view the contents
# you can explore summaries of the data
sf.show()
# you can also do this inline
graphlab.canvas.set_target('ipynb')     
sf['age'].show(view='Categorical')
Explanation: SFrame basics
End of explanation
sf['Country']
Explanation: Suppose we just wanted to look a single column.
End of explanation
# add a new column called "Full Name":
sf['Full Name'] = sf['First Name'] + ' ' + sf['Last Name']
sf
# You can filter finding all rows that match a logical condition
sf[sf['Full Name'] == 'Felix Brown']
# You can do math
print sf['age']
print sf['age'].mean()
print sf['age'].std()
print sf['age']*2
print sf['age']+2*sf['age']
sf['Country']
Explanation: You can add columns.
End of explanation
def transform_country(country):
    if country == 'USA':
        return 'United States'
    else:
        return country
sf['Country'].apply(transform_country)
Explanation: On the countries, notice that we have two country values that mean the same thing: "United States" and "USA".
To fix this we can apply a function to transform the 'USA' to 'United States'
End of explanation
sf['Country'] = sf['Country'].apply(lambda cur_value: 'United States' if cur_value == 'USA' else cur_value)
sf.show()
Explanation: We could also have used a <b>lambda</b> function in the apply. Lambdas are just inline, unamed functions. Lambdas also don't have explict return statements. What the expression evaluates to will be automatically returned
End of explanation
<END_TASK>