Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Plot Monthly Transaction Volumes | Financial Data Analysis for Bankers
Python for Bankers

bookChallenge: Plot Monthly Transaction Volumes

Task

Swipe to start coding

Given a DataFrame of transactions with dates, your goal is to group transactions by month, calculate the monthly totals for deposits and withdrawals, and plot both on the same chart using matplotlib.

  • Convert the date column to datetime and extract the month in "YYYY-MM" format.
  • Group the data by month and transaction type, summing the amount for each group.
  • Create a line or bar chart that displays both deposit and withdrawal totals for each month on the same plot.
  • The chart must have labeled axes, a title, and a legend distinguishing deposits and withdrawals.

Solution

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 1. ChapterΒ 5
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

bookChallenge: Plot Monthly Transaction Volumes

Swipe to show menu

Task

Swipe to start coding

Given a DataFrame of transactions with dates, your goal is to group transactions by month, calculate the monthly totals for deposits and withdrawals, and plot both on the same chart using matplotlib.

  • Convert the date column to datetime and extract the month in "YYYY-MM" format.
  • Group the data by month and transaction type, summing the amount for each group.
  • Create a line or bar chart that displays both deposit and withdrawal totals for each month on the same plot.
  • The chart must have labeled axes, a title, and a legend distinguishing deposits and withdrawals.

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Β 1. ChapterΒ 5
single

single

some-alt