Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Build a Simple Metrics Dashboard | Automating Reports and Visual Insights
Python Automation for Reports and Visual Insights
Seção 1. Capítulo 14
single

single

bookChallenge: Build a Simple Metrics Dashboard

Deslize para mostrar o menu

Tarefa

Deslize para começar a programar

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%

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 14
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt