Skip to content

statisticsnorway/ssb-fame-to-python

Repository files navigation

SSB Fame To Python

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Features

The package is imported using

from fython import fame_to_pandas, fame_to_csv

To load data from Fame-databases into a Pandas DataFrame, use

df = fame_to_pandas(['path/to/database1', 'path/to/database2', ...], 'q', '2023:1', '2024:4', 'your_search_query')

To load write data from Fame-databases to a csv-file, use

fame_to_csv(['path/to/database1', 'path/to/database2', ...], 'q', '2023:1', '2024:4', 'your_search_query', 'path/to/csv-file')

The search query should containg text and/or the wildcards "?" and/or "^" (any number of characters and exactly one character, respectively). Both functions have an optional decimals option (default is 10). fame_to_pandas has the option dtype (default is np.float128).

Requirements

  • python-versions = ">=3.6,<4.0"
  • pandas = ">=1.1.5"

Installation

pip install ssb-fame-to-python

Contributing

Contributions are very welcome. To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, SSB Fame To Python is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.