Using python write a program that reads the data from the attached .csv file: Crude0il_20212022.csv. The file contains data regarding the price and volume of Crude Oil traded from Augu Once the data has been read, determine and display the following information: The highest and lowest Close/Last price for crude oil for the months of August 2021 through July 2022. Both prices must be displayed with 2 decimal places using an f-string. The number of trading days for the months of August 2021 through July 2022. The total trading volume for the months of August 2021 through July 2022 displayed with the thousands comma separated. The average daily trading volume for the months of August 2021 through July 2022 displayed with the thousands comma separated. Date Close/Last Volume Open High Low 8/2/2021 71.26 429120 73.91 73.95 70.55 8/3/2021 70.56 486786 71.52 71.96 69.19 8/4/2021 68.15 557749 70.32 70.81 67.85 8/5/2021 69.09 397456 68.06 69.35 67.61 8/6/2021 68.28 497049 69.14 70.18 67.8 8/9/2021 66.48 558082 67.88 67.9 65.15 8/10/2021 68.29 421649 66.85 68.9 66.56 8/11/2021 69.25 479692 68.51 69.45 66.67 8/12/2021 69.09 316001 69.36 69.62 68.46 8/13/2021 68.44 250887 68.91 69.22 67.77 8/16/2021 67.29 310196 67.71 68.27 65.73 8/17/2021 66.59 218484 67.43 67.72 66.33 8/18/2021 65.46 100783 66.58 67.48 64.34 8/19/2021 63.69 50937 64.58 64.76 62.63 8/20/2021 62.32 20071 64.05 64.1 62.11 8/23/2021 65.64 381167 61.96 66 61.74 8/24/2021 67.54 321805 65.54 67.8 65.41 8/25/2021 68.36 340791 67.63 68.54 66.92 8/26/2021 67.42 330284 68 68.31 67.02 8/27/2021 68.74 305563 67.75 69.05 67.52 8/30/2021 69.21 346705 69.3 69.64 67.67 8/31/2021 68.5 302301 69.18 69.34 68.16 9/1/2021 68.59 376119 68.55 68.69 68.17 9/2/2021 69.99 380927 68.29 70.61 67.84 9/3/2021 69.29 294675 69.76 70.53 69.05 9/7/2021 68.35 464757 69.11 69.48 67.64 9/8/2021 69.3 356036 68.37 69.75 68.31 9/9/2021 68.14 527656 69.36 69.89 67.56 9/10/2021 69.72 382399 67.97 69.96 67.68 9/13/2021 70.45 347296 69.74 70.97 69.51 9/14/2021 70.46 373449 70.64 71.22 69.98 9/15/2021 72.61 391304 70.76 73.14 70.65 9/16/2021 72.57 271543 72.65 72.99 71.53 9/17/2021 71.97 104011 72.62 72.72 71.21 9/20/2021 70.29 49307 71.92 72.08 69.86 9/21/2021 70.56 27466 70.59 71.63 69.67 9/22/2021 72.23 366304 70.85 72.3 70.64 9/23/2021 73.3 389586 71.97 73.5 71.61 9/24/2021 73.98 336445 73.24 74.27 72.81 9/27/2021 75.45 400276 74.19 75.75 74.16 9/28/2021 75.29 456945 75.43 76.67 74.24 9/29/2021 74.83 408452 74.38 75.79 73.74 9/30/2021 75.03 566200 74.78 76.07 74.53

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
**Title:** Analyzing Crude Oil Trading Data with Python

**Objective:** Using Python, write a program that reads data from the attached `.csv file: CrudeOil_20212022.csv`. The file contains data regarding the price and volume of Crude Oil traded from August 2021 to July 2022.

**Tasks:**

1. **Determine and Display Information:**

   - **Highest and Lowest Close/Last Price:** 
     - Find the highest and lowest Close/Last price for crude oil for the months of August 2021 through July 2022.
     - Display both prices with two decimal places using an f-string.
  
   - **Number of Trading Days:**
     - Calculate the number of trading days for the months of August 2021 through July 2022.
  
   - **Total Trading Volume:**
     - Calculate the total trading volume for the months of August 2021 through July 2022.
     - Display the volume with thousands comma-separated.
  
   - **Average Daily Trading Volume:**
     - Calculate and display the average daily trading volume for the months of August 2021 through July 2022 with thousands comma-separated.

2. **Data Overview:**
   - A section of the dataset is provided below. Each row represents a trading day with the following columns: Date, Close/Last, Volume, Open, High, Low.

| Date       | Close/Last | Volume | Open  | High  | Low   |
|------------|------------|--------|-------|-------|-------|
| 8/2/2021   | 71.26      | 429120 | 73.91 | 73.95 | 70.55 |
| 8/3/2021   | 70.56      | 486786 | 71.52 | 71.96 | 69.19 |
| 8/4/2021   | 68.15      | 537794 | 70.83 | 70.85 | 67.53 |
| 8/5/2021   | 69.25      | 479456 | 68.97 | 70.2  | 66.92 |
| 8/6/2021   | 68.28      | 479049 | 69.14 | 70.18 | 67.8  |
| ...        |
Transcribed Image Text:**Title:** Analyzing Crude Oil Trading Data with Python **Objective:** Using Python, write a program that reads data from the attached `.csv file: CrudeOil_20212022.csv`. The file contains data regarding the price and volume of Crude Oil traded from August 2021 to July 2022. **Tasks:** 1. **Determine and Display Information:** - **Highest and Lowest Close/Last Price:** - Find the highest and lowest Close/Last price for crude oil for the months of August 2021 through July 2022. - Display both prices with two decimal places using an f-string. - **Number of Trading Days:** - Calculate the number of trading days for the months of August 2021 through July 2022. - **Total Trading Volume:** - Calculate the total trading volume for the months of August 2021 through July 2022. - Display the volume with thousands comma-separated. - **Average Daily Trading Volume:** - Calculate and display the average daily trading volume for the months of August 2021 through July 2022 with thousands comma-separated. 2. **Data Overview:** - A section of the dataset is provided below. Each row represents a trading day with the following columns: Date, Close/Last, Volume, Open, High, Low. | Date | Close/Last | Volume | Open | High | Low | |------------|------------|--------|-------|-------|-------| | 8/2/2021 | 71.26 | 429120 | 73.91 | 73.95 | 70.55 | | 8/3/2021 | 70.56 | 486786 | 71.52 | 71.96 | 69.19 | | 8/4/2021 | 68.15 | 537794 | 70.83 | 70.85 | 67.53 | | 8/5/2021 | 69.25 | 479456 | 68.97 | 70.2 | 66.92 | | 8/6/2021 | 68.28 | 479049 | 69.14 | 70.18 | 67.8 | | ... |
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
User Defined DataType
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education