На Flask сделана страница html с таблицей где в столбцах есть значения, в основном от 1 до 10. Как поменять цвет ячейки если значения в ней, больше 5

<div class="px-5 mx-5">
    <h1>Basketball</h1>

    <table class="table table-striped table-bordered">
        <thead>
            <tr>
                {% for header in headers %}
                    <th>{{header}}</th>
                {% endfor %}
            </tr>
        </thead>

        <tbody>
            {% for row in tableData %}
                <tr>
                    <td>{{row['league']}}</td>
                    <td>{{row['team']}}</td>
                    <td>{{row['date of last game']}}</td>
                    <td>{{row['type of series']}}</td>
                    <td>{{row['current series']}}</td>
                    <td>{{row['longest series']}}</td>

            {% endfor %}
            </tbody>
        </table>

app = Flask(__name__)

@app.route('/')
def index():
    headers = ['league', 'team', 'date of last game', 'type of series', 'current series', 'longest series']
    with open('analytics/basketball_even_odd.csv', 'r', encoding='utf-8') as f_open_csv:
        rows = csv.reader(f_open_csv, delimiter=",")
        tableData = []
        for row in rows:
            dict_b = {}
            dict_b['league'] = row[0]
            dict_b['team'] = row[1]
            dict_b['date of last game'] = row[2]
            dict_b['type of series'] = row[3]
            dict_b['current series'] = row[4]
            dict_b['longest series'] = row[5]
            tableData.append(dict_b)

Ответы (0 шт):