Simple tools to load/modify/export XML/RDF data using Pandas DataFrames
Project description
About:
- Parses CIM RDF/XML data to pandas dataframe with 4 columns [ID, KEY, VALUE, INSTANCE_ID] (triplestore like)
- The solution does not care about CIM version nor namespaces
- Input files can be xml or zip files (containing one or mutiple xml files)
- All files are parsed into one and same Pandas DataFrame, thus if you want single file or single data model, you need to filter on INSTANCE_ID column
Documentation:
https://haigutus.github.io/triplets
To get started:
python -m pip install triplets
import pandas
import triplets
path = "CGMES_v2.4.15_RealGridTestConfiguration_v2.zip"
data = pandas.read_RDF([path])
Result:
You can then query a dataframe of all same type elements and its parameters across all [EQ, SSH, TP, SV etc.] instance files, where parameters are columns and index is object ID-s
data.type_tableview("ACLineSegment")
Export:
data.export_to_cimxml(
rdf_map=schemas.ENTSOE_CGMES_2_4_15_552_ED1,
export_type=ExportType.XML_PER_INSTANCE_ZIP_PER_XML,
)
Look into examples folders for more
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file triplets-0.0.17.tar.gz.
File metadata
- Download URL: triplets-0.0.17.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
329e791bce2f17fd655c7f06db1ea6a87cdc9a07d50d82effc3867427a8d1ef9
|
|
| MD5 |
cbf0c6a79800fa8ad7ab1a5d91357ce9
|
|
| BLAKE2b-256 |
682e6db8c9794586df559c7ce721616567c3b2ea43b5340e8260a6df72ce8802
|
File details
Details for the file triplets-0.0.17-py3-none-any.whl.
File metadata
- Download URL: triplets-0.0.17-py3-none-any.whl
- Upload date:
- Size: 1.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
075f64f6777abd906e51e1e6dddb9fe923bf18fcef374920de68932b8fb295d2
|
|
| MD5 |
5c45dd19980e717a9d6df62f1689a974
|
|
| BLAKE2b-256 |
b6886f943285186de3a885b2256806fd5626e70d501cf9b08a643de16ef653f3
|