Tutorial – getting started in Python
Python is an extensive language, and any attempt to summarize its capabilities in under 10 pages would be limited. While this book is not intended to be used as a comprehensive guide to Python, we will talk through a number of the must-know commands and capabilities that every data scientist should be aware of. We will see the vast majority of these commands come up in the tutorials to come.
Creating variables
One of the core concepts in Python is the idea of variables. Variables are items that Python manipulates, with each variable having a type. Operators such as addition (+
) or subtraction (-
) can be combined with variables to create expressions. An example of an expression can be created using three variables. First, a value of 5
will be assigned to the x
variable, and then, a value of 10
will be assigned to the y
variable. The two variables (x
and y
), which are now representing numerical values, are considered objects in Python...