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

bookChallenge: Plot Monthly Transaction Volumes

Uppgift

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.

Lösning

Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

Fråga AI

expand

Fråga AI

ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

Suggested prompts:

Can you explain this in simpler terms?

What are the main benefits or drawbacks?

Can you give me a real-world example?

close

bookChallenge: Plot Monthly Transaction Volumes

Svep för att visa menyn

Uppgift

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.

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 5
single

single

some-alt