[BUG] Global commodities column name mapping conflict
@tsmbland ci sta già lavorando.
Dal 3/10/2025.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Describe the bug
Older global_commodities input files will have headings Commodity, CommodityName etc.
The mapping from these old columns names to the new names is:
Commodity -> description
CommodityName - > commodity
There is a problem here: how does muse know whether a column called "commodity" is in the old parlance or the new parlance?
At present the mapping Commodity -> description does not seem to be listed in csv.py
If we added it, it would incorrectly map a new style column name, because the mapping is done after reducing to camel case.
One tempting fix would be to do the mapping before the case change. However, this would put us back into a situation of being case-sensitive, which we were trying to get away from...
Hopefully there is a better solution? (Or I have misunderstood the cause of the problem..?)
To Reproduce
Run the function standardize_dataframe() from csv.py on the input file global_commodities.csv
Expected behavior
`ValueError: Duplicate columns in Index(['commodity', 'commodity_type', 'commodity', 'emmission_factor'], dtype='object')'
Context
Please, complete the following to better understand the system you are using to run MUSE.
- Operating system (eg. Windows 10): Mac OSX
- MUSE version (eg. 1.0.1): b779f2339abaddcc76e0b196192f8625ebb4486a
- Installation method (eg. pipx, pip, development mode): development mode
- Python version (you can get this running
python --version): 3.9.18
- Lingua principale
- Python
- Stelle
- 29
- Fork
- 12
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di EnergySystemsModellingLab/MUSE_OS
-
Release notes for v2.2.0 Aperta
EnergySystemsModellingLab/MUSE_OS#850 · 1 assegnatario ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
bug
EnergySystemsModellingLab/MUSE_OS#804 · 2 commenti · 3 assegnatari ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
Tutte le issue di EnergySystemsModellingLab/MUSE_OS
Issue simili
-
bug confirmed issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
open-webui/open-webui#30750 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100