From the course: Python Data Analysis

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Warmup with Python loops

Warmup with Python loops - Python Tutorial

From the course: Python Data Analysis

Start my 1-month free trial

Warmup with Python loops

- [Instructor] We will begin every video by importing a standard set of Python modules that we need. This is a typical list. It's expedient to load often used modules by giving them a shorter alias. NP is the community standard for NumPy, PD for pandas. We also load this simple commander entity interface to matplotlib, pyplots, and finally, we ask the Jupyter notebook to keep the plots that we make in the notebook itself instead of opening a different window. So I shall now execute this cell by pressing Shift + Return. If you've worked in programming before, you must be familiar with loops. They allow us to automate repetitive operations. And loops are a good topic to start a quick review of the Python core language, which will focus on the features that are most important to work with data. So, how exactly do loops work in Python? We see them in a concrete example. Consider the combinatorial problem of breaking a U.S…

Contents