A package for interacting with the UK Civil Service Office for National Statistics' Beta API.
Project description
Installation
You can install this package using pip:
pip install onsapi
Example usage
To get a list of all the available datasets:
from onsapi import OnsApiClient
client = OnsApiClient()
list_of_datasets = client.list_datasets()
for dataset in list_of_datasets.items:
print(dataset)
To load a certain dataset as a dataframe:
selected_dataset = list_of_datasets[0]
selected_dataset.download_csv()
df = selected_dataset.load_as_df()
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
onsapi-0.1.0.tar.gz
(8.6 kB
view details)
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 onsapi-0.1.0.tar.gz.
File metadata
- Download URL: onsapi-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e828e4d96982c646ba14fb7e2f73fe311a1296ae254277ac39f1f56f2d21193
|
|
| MD5 |
d05be70aed0a387da6fa7c2bbae45e49
|
|
| BLAKE2b-256 |
24495526b38617b761aaac2c463321d8d59f916558dd564ae368f54a8a7fb166
|
File details
Details for the file onsapi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: onsapi-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
073a3ef222e7c66d50a38a74e94dd4e172bf664995fa15e4c0a1fde423e0c1b2
|
|
| MD5 |
5238fd0fab393fa3db64bfb5beba3de4
|
|
| BLAKE2b-256 |
66a89c701ab290cfca12cbd991fa330068554a73e46aea9651b2bc30a29f9016
|