[BUG] Global commodities column name mapping conflict
@tsmbland がすでに取り組んでいます。
2025年10月3日 から。
評価
この issue はまだ評価されていません。
説明
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
- 主要言語
- Python
- スター
- 29
- フォーク
- 12
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
EnergySystemsModellingLab/MUSE_OS のほかの issue
-
Release notes for v2.2.0再び着手できるかも @tsmbland が 54 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
EnergySystemsModellingLab/MUSE_OS#850 · 担当者 1 名 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
[BUG] MUSE stopping without error/warning message再び着手できるかも @sharwaridixit が 329 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンbug
EnergySystemsModellingLab/MUSE_OS#804 · コメント 2 件 · 担当者 3 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
EnergySystemsModellingLab/MUSE_OS の issue をすべて見る
似ている issue
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
openwisp/openwisp-utils#777 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
google-research/weatherbenchX#310 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
huggingface/peft#3955 ·
メンテナーはふだん 1 日以内に返信
-
author-page correction
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
acl-org/acl-anthology#10313 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
AOSSIE-Org/Gitcord-GithubDiscordBot#147 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信