Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maria Betânia - Resolução do Projeto #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Maria-Bethania
Copy link

Descrição

Uso do Pandas e Tabulate - Manipulação e formatação do dataset de forma tabular

Funções - Cada funcionalidade em funções separadas, para organizar o código e entender melhor o programa

   Facilitou para eu fazer a resolução;

Interação com usuário - O menu permite interação do usuário com o sistema.

Comment on lines +99 to +117
def HighProfitExpenseMonth(): # Mês com mais lucro e mais despesa
lucro_maximo = 0
mes_lucro_maximo = ''
despesa_maxima = 0
mes_despesa_maxima = ''

for item in dataset:
lucro = item['faturamento'] - item['despesas']

if lucro > lucro_maximo:
lucro_maximo = lucro
mes_lucro_maximo = item['mes_receita']

if item['despesas'] > despesa_maxima:
despesa_maxima = item['despesas']
mes_despesa_maxima = item['mes_receita']

print(f"O mês com maior lucro foi: {mes_lucro_maximo}")
print(f"O mês com maior despesa foi: {mes_despesa_maxima}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
De qual ano? 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

É vero... Serve pra nada se não souber o ano. Vou corrigir.

@@ -0,0 +1,146 @@

import pandas as pd
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

não está sendo utilizado

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pensei que, para o tabulate, iria precisar do pandas... My mistake, como cantava o Pholhas. Vou fazer essas correções.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mulher, eu tava bugando com o tipo dos dados e acabei criando esse arquivo. Releva.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants