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

single

bookChallenge: Build a Simple Metrics Dashboard

Scorri per mostrare il menu

Compito

Scorri per iniziare a programmare

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%

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 1. Capitolo 14
single

single

Chieda ad AI

expand

Chieda ad AI

ChatGPT

Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione

some-alt