Skip to main content

Get data from PxWeb API easily.

Project description

pxwebpy

ci release
Easily get data from the PxWeb API and into either a polars or pandas dataframe.

Pxwebpy parses the PxWeb table data as well as metadata using the json-stat2 response format.

It has been tested with Statistics Sweden, Statistics Finland, Statistics Greenland and Statistics Norway.

Basic usage

import pandas as pd
import polars as pl

from pxwebpy import PxWeb

some_px_table = PxWeb(url, query)

pandas_df = pd.DataFrame(some_px_table.dataset)

polars_df = pl.DataFrame(some_px_table.dataset)

See examples for more details on how to use pxwebpy.

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

pxwebpy-0.1.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

pxwebpy-0.1.1-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

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