This activity involves two challenges- PyBank (budget data) and PyPoll (election data)
Create a Python script to analyze the financial records of a company. You will be provided with a dataset called budget_data.csv. The dataset consists of two columns: Date and Profit/Losses.
-
Create the script that analyzes the records to calculate -
- The total number of months included in the dataset
- The net total amount of “Profit/Losses” over the entire period
- The changes in “Profit/Losses” over the entire period, and the average of those changes
- The greatest increase in profits (date and amount) over the entire period
- The greatest decrease in losses (date and amount) over the entire period
-
Print and store the analysis results
In this challenge, you are tasked with helping a small, rural town modernize its vote counting process. You are provided with a dataset called election_data.csv. The dataset consists of three columns: Voter ID, County, and Candidate.
-
Create the script that analyzes the votes to calculate -
- Total number of votes cast
- List of candidate names
- Percentage of votes each candidate won
- Total number of votes each candidate won
- Winner of the election
-
Print and store the analysis results
Since the election dataset election_data.csv is a large file, and is unable to upload from local computer, the screenshot of dataset is added to 'Resources' folder for the reference.