semvec/pypi-packages huggingface dataset:
qmlpandas 0.0.1
A simple parser for QGIS style files to pandas DataFrame
License: APACHE
Requires Python: >=3.12

# Usage
You can use the `qmlpandas` package to transform from xml-files to a pandas.DataFrame, via `qml2df` or vice versa via `df2qml`. 
Below is a quick example demonstrating how to use these functions.

## Example Code

```python
from qmlpandas.parsing import qml2df

file_location = 'XYZ.qml'
df = qml2df(file_location)
```

```python
import pandas as pd
from qmlpandas.parsing import df2qml

file_out = 'XYZ.qml'

df = pd.DataFrame([{"value": 1, "color":"#73df1f", "label": "A", "alpha": 255},
                   {"value": 2, "color":"#e89919", "label": "B", "alpha": 255}
                   ])
df = df.set_index('value')
df2qml(df, file_out)
```