Overview of Python
As mentioned earlier, Python is one of the most popular programming languages for data science. But before diving into Python's data science applications, let's have a quick introduction to some core Python concepts.
Types of Variable
In Python, you can handle and manipulate different types of variables. Each has its own specificities and benefits. We will not go through every single one of them but rather focus on the main ones that you will have to use in this book. For each of the following code examples, you can run the code in Google Colab to view the given output.
Numeric Variables
The most basic variable type is numeric. This can contain integer or decimal (or float) numbers, and some mathematical operations can be performed on top of them.
Let's use an integer variable called var1
that will take the value 8
and another one called var2
with the value 160.88
, and add them together with the +
operator, as shown here:
var1...