Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Analyze Profit Trends | Analyzing Financial Data
Python for Accountants

bookChallenge: Analyze Profit Trends

Task

Swipe to start coding

Given a CSV file containing columns for Month, Revenue, and Expenses, your goal is to analyze monthly profit trends for a fictional company.

  • Calculate the monthly profit by subtracting the Expenses column from the Revenue column for each row.
  • Compute a 3-month moving average of the monthly profit, with at least one period required for calculation.
  • Plot both the monthly profit and its 3-month moving average on a line chart, labeling each line appropriately.
  • The x-axis should represent the Month column, and the y-axis should represent profit.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 5
single

single

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Suggested prompts:

Can you explain this in simpler terms?

What are the next steps I should take?

Can you provide an example?

close

bookChallenge: Analyze Profit Trends

Swipe to show menu

Task

Swipe to start coding

Given a CSV file containing columns for Month, Revenue, and Expenses, your goal is to analyze monthly profit trends for a fictional company.

  • Calculate the monthly profit by subtracting the Expenses column from the Revenue column for each row.
  • Compute a 3-month moving average of the monthly profit, with at least one period required for calculation.
  • Plot both the monthly profit and its 3-month moving average on a line chart, labeling each line appropriately.
  • The x-axis should represent the Month column, and the y-axis should represent profit.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 2. ChapterΒ 5
single

single

some-alt