import matplotlib.pyplot as plt
import pandas as pd


def draw(dataset):
    numb = list(data.Passengerid)
    ages = list(dataset.Age)
    genders = list(dataset.Sex)
    colors = []
    for i in range(0, len(ages)):
        if genders[i] == 0:
            colors.append('r')
        else:
            colors.append('b')
    fig, ax = plt.subplots()
    ax.bar(numb, ages, color=colors)
    plt.show()


data = pd.read_csv("titanic.csv")
draw(data)

db0ac9ccf58c5a44fd747c32531efb2153c7f43e
<mask token>

<mask token>


def draw(dataset):
    numb = list(data.Passengerid)
    ages = list(dataset.Age)
    genders = list(dataset.Sex)
    colors = []
    for i in range(0, len(ages)):
        if genders[i] == 0:
            colors.append('r')
        else:
            colors.append('b')
    fig, ax = plt.subplots()
    ax.bar(numb, ages, color=colors)
    plt.show()


<mask token>
draw(data)

<mask token>


def draw(dataset):
    numb = list(data.Passengerid)
    ages = list(dataset.Age)
    genders = list(dataset.Sex)
    colors = []
    for i in range(0, len(ages)):
        if genders[i] == 0:
            colors.append('r')
        else:
            colors.append('b')
    fig, ax = plt.subplots()
    ax.bar(numb, ages, color=colors)
    plt.show()


data = pd.read_csv('titanic.csv')
draw(data)

import matplotlib.pyplot as plt
import pandas as pd


def draw(dataset):
    numb = list(data.Passengerid)
    ages = list(dataset.Age)
    genders = list(dataset.Sex)
    colors = []
    for i in range(0, len(ages)):
        if genders[i] == 0:
            colors.append('r')
        else:
            colors.append('b')
    fig, ax = plt.subplots()
    ax.bar(numb, ages, color=colors)
    plt.show()


data = pd.read_csv('titanic.csv')
draw(data)

import matplotlib.pyplot as plt
import pandas as pd


def draw(dataset):
    numb = list(data.Passengerid)
    ages = list(dataset.Age)
    genders = list(dataset.Sex)
    colors = []
    for i in range(0, len(ages)):
        if genders[i] == 0:
            colors.append('r')
        else:
            colors.append('b')
    fig, ax = plt.subplots()
    ax.bar(numb, ages, color=colors)
    plt.show()


data = pd.read_csv("titanic.csv")
draw(data)
