Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lära Challenge: Build a Simple Metrics Dashboard | Automating Reports and Visual Insights
Python Automation for Reports and Visual Insights
Avsnitt 1. Kapitel 14
single

single

bookChallenge: Build a Simple Metrics Dashboard

Svep för att visa menyn

Uppgift

Svep för att börja koda

Task: Business Metrics Dashboard

Create a function print_metrics_dashboard(df) that accepts a DataFrame with sales, conversions, and visits columns and prints a formatted summary of key business metrics.

  • Calculate total sales — the sum of the sales column
  • Calculate average order value — the mean of the sales column
  • Calculate conversion rate — the sum of conversions divided by the sum of visits, multiplied by 100

The printed output must include:

  • A header line: === Metrics Dashboard ===
  • Total sales formatted as: Total Sales: $X,XXX.XX
  • Average order value formatted as: Average Order Value: $X,XXX.XX
  • Conversion rate formatted as: Conversion Rate: XX.XX%

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 14
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

some-alt