Challenge: Exploring a Sports Dataset
Завдання
Swipe to start coding
In this task, you will use pandas to create and inspect a dataset of match results. You will practice loading data into a DataFrame and exploring its structure.
- Create a pandas DataFrame using the following hardcoded data:
- Dates: "2024-04-01", "2024-04-02", "2024-04-03", "2024-04-04", "2024-04-05".
- Home Teams: "Lions", "Tigers", "Bears", "Wolves", "Eagles".
- Away Teams: "Eagles", "Wolves", "Tigers", "Lions", "Bears".
- Home Scores: 3, 2, 1, 0, 4.
- Away Scores: 1, 2, 2, 3, 2.
- Assign the DataFrame to a variable named
dfat the module level. - Display the first five rows of the DataFrame.
- Print basic information about the DataFrame, including the column types and number of entries.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 3
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Чудово!
Completion показник покращився до 5.88
Challenge: Exploring a Sports Dataset
Свайпніть щоб показати меню
Завдання
Swipe to start coding
In this task, you will use pandas to create and inspect a dataset of match results. You will practice loading data into a DataFrame and exploring its structure.
- Create a pandas DataFrame using the following hardcoded data:
- Dates: "2024-04-01", "2024-04-02", "2024-04-03", "2024-04-04", "2024-04-05".
- Home Teams: "Lions", "Tigers", "Bears", "Wolves", "Eagles".
- Away Teams: "Eagles", "Wolves", "Tigers", "Lions", "Bears".
- Home Scores: 3, 2, 1, 0, 4.
- Away Scores: 1, 2, 2, 3, 2.
- Assign the DataFrame to a variable named
dfat the module level. - Display the first five rows of the DataFrame.
- Print basic information about the DataFrame, including the column types and number of entries.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 3
single