Resolve deprecation issue with `create_cosmos_bc_excel.py`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- pandas, python
- Ambito
- data-engineering
Direzione di ricerca
Inizia dalle assegnazioni alle righe 193, 220 e 223 di scripts/create_cosmos_bc_excel.py; gli avvisi segnalano assegnazioni concatenate che con pandas 3.0 non aggiorneranno più il DataFrame originale. Esegui il comando mostrato nell’issue per riprodurli, quindi aggiorna le assegnazioni in modo che gli avvisi scompaiano e verifica che i file Excel e CSV vengano ancora generati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
FutureWarning: ChainedAssignmentError error messager thrown when executing create_cosmos_bc_excel.py script.
% python scripts/create_cosmos_bc_excel.py -s YAML -y yaml/20261027_r19/bc -o curation/draft/cdisc_biomedical_concepts_r19_draft.xlsx -d 20261027
Getting 118 YAML files from yaml/20261027_r19/bc
Writing ReadMe sheet
Writing Biomedical Concepts sheet
Writing Categories sheet
/Users/dmoreland/projects/COSMoS/scripts/create_cosmos_bc_excel.py:193: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:
df["col"][row_indexer] = value
Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_new['count_dec'] = 1 * (pd.notna(df['dec_id']) & (df['dec_id'] != ''))
/Users/dmoreland/projects/COSMoS/scripts/create_cosmos_bc_excel.py:220: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:
df["col"][row_indexer] = value
Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_processed['bc_hierarchy_level'] = df_processed['bc_id'].map(
/Users/dmoreland/projects/COSMoS/scripts/create_cosmos_bc_excel.py:223: FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!
You are setting values through chained assignment. Currently this works in certain cases, but when using Copy-on-Write (which will become the default behaviour in pandas 3.0) this will never work to update the original DataFrame or Series, because the intermediate object on which we are setting values will behave as a copy.
A typical example is when you are setting values in a column of a DataFrame, like:
df["col"][row_indexer] = value
Use `df.loc[row_indexer, "col"] = values` instead, to perform the assignment in a single step and ensure this keeps updating the original `df`.
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
df_processed['bc_hierarchy_full'] = df_processed['bc_id'].map(
Writing BC Hierarchy sheet
Excel file saved as curation/draft/cdisc_biomedical_concepts_r19_draft.xlsx
CSV file saved as curation/draft/cdisc_biomedical_concepts_r19_draft.csv
CSV file saved as curation/draft/cdisc_biomedical_concepts_r19_draft_hierarchy.csv
- Lingua principale
- SAS
- Stelle
- 35
- Fork
- 7
- Merge medio
- 42m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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 cdisc-org/COSMoS
-
MacOS/Linux scripts to add enums to the modelsForse già presa @pendingintent l’ha presa 63 giorni fa. Apertaenhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Additional enums are required for package 19Forse già presa @pendingintent l’ha presa 8 giorni fa. Apertadocumentation enhancement
-
Deployment of BC Package 19Forse già presa @pendingintent l’ha presa 21 giorni fa. Apertaenhancement
-
Lists do not support values that contain a semi-colonForse di nuovo libera @lexjansen l’ha presa 160 giorni fa e non c’è nessuna pull request aperta. Aperta
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
Tutte le issue di cdisc-org/COSMoS
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
freelawproject/juriscraper#2367 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Type: ☹︎ Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
posit-dev/great-tables#1047 ·
I maintainer di solito rispondono entro 1 giorno
-
lane:collect
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
SPARDiffData/differential-data-collection#78 ·
I maintainer di solito rispondono entro 1 giorno
-
? - Needs Triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 2 giorni
-
automated endpoint-dead needs-curation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100