# RDF parser:
- 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
## To get started:
```python
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
```python
data.type_tableview("ACLineSegment")
```

Look into examples folders for more
Raw data
{
"_id": null,
"home_page": "https://github.com/Haigutus/triplets",
"name": "triplets",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Kristjan Vilgo",
"author_email": "kristjan.vilgo@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/a0/78/50ddf7fd534d1fc69d82c6ba83210cfdbd484d63b5e8d89f05cded546b06/triplets-0.0.11.tar.gz",
"platform": null,
"description": "# RDF parser:\n\n - Parses CIM RDF/XML data to pandas dataframe with 4 columns [ID, KEY, VALUE, INSTANCE_ID] (triplestore like)\n - The solution does not care about CIM version nor namespaces\n - Input files can be xml or zip files (containing one or mutiple xml files)\n - 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\n\n## To get started:\n\n```python\nimport pandas\nimport triplets\n\npath = \"CGMES_v2.4.15_RealGridTestConfiguration_v2.zip\"\ndata = pandas.read_RDF([path])\n```\n\n## Result:\n\n\n\n\nYou 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\n\n```python\ndata.type_tableview(\"ACLineSegment\")\n```\n\n\n\n\nLook into examples folders for more\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Simple tools to load/modify/export XML/RDF data using Pandas DataFrames",
"version": "0.0.11",
"project_urls": {
"Homepage": "https://github.com/Haigutus/triplets"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "170a57cd9a950c09cb0b4a310eba53c8b2676c1e36d9cecc7dad1321f8817a35",
"md5": "0d597fcb6f50fc767cd0b950bdc88261",
"sha256": "6f728262a185508a316c243e2efa2fb0478e961a564cd261938811d0ff09d8bb"
},
"downloads": -1,
"filename": "triplets-0.0.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0d597fcb6f50fc767cd0b950bdc88261",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 21440,
"upload_time": "2025-07-10T07:25:44",
"upload_time_iso_8601": "2025-07-10T07:25:44.946046Z",
"url": "https://files.pythonhosted.org/packages/17/0a/57cd9a950c09cb0b4a310eba53c8b2676c1e36d9cecc7dad1321f8817a35/triplets-0.0.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a07850ddf7fd534d1fc69d82c6ba83210cfdbd484d63b5e8d89f05cded546b06",
"md5": "4ed331c67873b8884f308e63f4289682",
"sha256": "eddfa949ae5a32e280595ecfaea576b63deb8427cda830f28080f76de16f6c70"
},
"downloads": -1,
"filename": "triplets-0.0.11.tar.gz",
"has_sig": false,
"md5_digest": "4ed331c67873b8884f308e63f4289682",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 36553,
"upload_time": "2025-07-10T07:25:46",
"upload_time_iso_8601": "2025-07-10T07:25:46.289959Z",
"url": "https://files.pythonhosted.org/packages/a0/78/50ddf7fd534d1fc69d82c6ba83210cfdbd484d63b5e8d89f05cded546b06/triplets-0.0.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-10 07:25:46",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Haigutus",
"github_project": "triplets",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "triplets"
}