Skip to main content

A simple parser for QGIS style files to pandas DataFrame

Project description

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

from qmlpandas.parsing import qml2df

file_location = 'XYZ.qml'
df = qml2df(file_location)
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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qmlpandas-0.0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qmlpandas-0.0.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file qmlpandas-0.0.1.tar.gz.

File metadata

  • Download URL: qmlpandas-0.0.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for qmlpandas-0.0.1.tar.gz
Algorithm Hash digest
SHA256 76b85c2df263966d20c0145e5c1eb228f59f212aa8fcef8120981eb8558dbdf7
MD5 32bc7f6b7d35ca79a7d2a063cdf0ce68
BLAKE2b-256 78a0bf4e4f759700e19c0104e3df6c74d27d3b444f2decf1cc6b00866d811f6c

See more details on using hashes here.

File details

Details for the file qmlpandas-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: qmlpandas-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for qmlpandas-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1808b286dc42b2d98c02c2ba016e1711aa4911b107bd8c6d3e1627c1114e736e
MD5 6ab7850f32e7b69370b90146afa0b77b
BLAKE2b-256 87b95a62ad05c7073d763179eaa78a0a60d40fc91b5657391a4752d7ad27fb3b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page