#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Let's put what we learned into practice: 

Given an array of 1s and 2s, suppose that I need to count how many times 
it turns from being 1 to being 2. How many switches happen in this array? 
"""
import pandas as pd
import numpy as np

#%%
# 1) set the seed of the random number generator:
np.random.seed(420)

# 2) define an array (100K rows, that can take only two values) 
x = np.random.choice([1, 2], size=100000)
