Bestehendes Projekt zu Gitea hinzugefügt

This commit is contained in:
2026-02-27 11:05:06 +01:00
commit 7c25caab32
4 changed files with 35155 additions and 0 deletions

29
oeko.py Normal file
View File

@@ -0,0 +1,29 @@
import pandas as pd
import numpy as np
epd = pd.read_csv("epd.csv", sep=";")
data = (
pd.read_csv("details.csv", sep=";")
[lambda x: (x['produkt_name'].str.contains('Cement', na=False)) & (x['umwelteinwirkung_id'] == '6a37f984-a4b3-458a-a20a-64418c145fa2')]
.merge(epd)
)
rezept = (
pd.DataFrame({
'Artikelname': ['Zement 1', 'Zement 2', 'Zement 3'],
'uuid': [
'55af842c-7d33-4d0c-b33b-ac7564e573bf',
'49b9328a-3e77-4cea-98b8-5704a7b24883',
'a6376437-3772-4938-b7bb-d97b60628f11'
],
'menge': [80, 90, 100]
}) # <--- Hier muss die Klammer vom DataFrame zu!
.merge(data)
.assign(
result = lambda x: x['wert'] * x['menge']
)
.groupby('umwelteinwirkung')['result']
.sum()
.reset_index()
)