Skip to content

Compact merge CSV

After running merge operations, the CSV files contain a Done column marking completed rows. This script extracts only successful merges and combines them into a single CSV.

Terminal window
uv run python -m oc_meta.run.merge.compact_output_csv <INPUT_DIR> <OUTPUT_FILE>
ArgumentDescription
INPUT_DIRDirectory containing merge CSV files
OUTPUT_FILEPath for the output CSV
Terminal window
uv run python -m oc_meta.run.merge.compact_output_csv groups/ completed_merges.csv
surviving_entity,merged_entities
https://w3id.org/oc/meta/br/060/1,https://w3id.org/oc/meta/br/060/2; https://w3id.org/oc/meta/br/060/3
https://w3id.org/oc/meta/br/060/100,https://w3id.org/oc/meta/br/060/101