Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lære Challenge: Plot Monthly Transaction Volumes | Financial Data Analysis for Bankers
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Bankers

bookChallenge: Plot Monthly Transaction Volumes

Opgave

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 alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 5
single

single

Spørg AI

expand

Spørg AI

ChatGPT

Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat

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

Stryg for at vise menuen

Opgave

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 desktopSkift til skrivebord for at øve i den virkelige verdenFortsæt der, hvor du er, med en af nedenstående muligheder
Var alt klart?

Hvordan kan vi forbedre det?

Tak for dine kommentarer!

Sektion 1. Kapitel 5
single

single

some-alt