Should unspecified optional strings be the empty string or NaN?
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
Start by reviewing the PEtab optional string-column handling described in the issue and the affected entry point in AMICI's python/amici/plotting.py at line 81. Decide how unspecified values should be represented without confusing a literal 'nan' name, then verify the behavior across parsing and plotting integration.
由索引模型根據 Issue 內容生成。
描述
At the moment, there can be NaNs (after pd.read_csv) in optional PEtab string columns, such as observableNames, that, if interpreted as a string, are converted to the string literal 'nan'.
>>> import numpy as np
>>> str(np.nan)
'nan'
An issue can occur in the AMICI plotting functions. This issue can be fixed by replacing
elif model.getObservableNames()[iy] != '':
with
elif model.getObservableNames()[iy] in ['', 'nan']:
to correctly identify unspecified observable names. However, testing for the string 'nan' seems unintuitive, and this fix might cause another issue if an observable is named 'nan'.
Here's a solution, which could be implemented in PEtab, and might resolve the issue in AMICI.
$ cat test_str.csv
observableId observableName
a_id a_name
b_id
>>> import pandas as pd
>>> df1 = pd.read_csv('test_str.csv', sep='\t')
>>> df2 = pd.read_csv('test_str.csv', sep='\t')
>>> df2['observableName'] = df2['observableName'].fillna('')
>>> df1
observableId observableName
0 a_id a_name
1 b_id NaN
>>> df2
observableId observableName
0 a_id a_name
1 b_id
- 主要語言
- Python
- 星號
- 18
- 分支
- 9
- 平均合併
- 1 天 21 小時
- 30 天內合併 PR
- 25
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PEtab-dev/libpetab-python 的其他 Issue
-
`petab1to2`: random column name for pre-existing `experimentId` column可能已有人在做 @dweindl 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
PEtab-dev/libpetab-python#568 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 73/100
PEtab-dev/libpetab-python#566 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
PEtab-dev/libpetab-python#549 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 72/100
PEtab-dev/libpetab-python#525 ·
維護者通常 1 天內回覆
-
`petablint` fails for PEtab v2 problems with only warnings可能已有人在做 @dweindl 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 35/100
PEtab-dev/libpetab-python#567 · 已指派 1 人 ·
維護者通常 1 天內回覆
查看 PEtab-dev/libpetab-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 78/100
sylvainmetayer/homelab#851 ·
維護者通常 1 天內回覆
-
needs triage
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 85/100
kubeflow/docs-agent#279 ·
維護者通常 3 天內回覆
-
enhancement
難度 2/5 1-3 小時 新手友好度 67/100
Qiskit/qiskit-ibm-runtime#3523 ·
維護者通常 1 天內回覆