pandas-config
A simple utility to load pandas configurations from INI files.
Description
This package provides an elegant solution for managing pandas options through INI configuration files. It allows you to easily define and load different pandas configurations without modifying the source code (at least for the options accepting literal values).
Installation
To install the required dependencies:
Using uv:
uv add pandas-config
Using pip:
pip install pandas-config
Usage
The main module pandas.configfile contains a load() function that loads pandas configurations from an INI file.
Basic Example
- Create a
.pandas.iniconfiguration file in your current directory:
[display]
width = 200
max_colwidth = 25
max_columns = 20
min_rows = 20
precision = 3
[display.html]
border = 4
- Load the configuration in your code:
from pandas.configfile import load
# Load configuration from default .pandas.ini file
load()
# Or specify a custom path
load("path/to/config.ini")
Parameters
path(optional): Path to the configuration file. Default:.pandas.iniencoding(optional): File encoding. Default:utf-8
Configuration File Structure
The configuration file must follow the standard INI format:
- Sections define pandas option groups (e.g.,
[display]) - Values must be valid Python literals
- Subsections use dot as separator (e.g.,
[display.html])
See the Pandas documentation for more details.
Dependencies
- pandas
- Python 3.10+
Notes
- Values in the configuration file must be valid Python literals (evaluated using
ast.literal_eval()) - The default configuration file is
.pandas.iniin the current directory - If no file is found at the specified location, no error will be raised and the default configuration will be used
Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request.
Metadata
Release files for pandas-config 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pandas_config-0.2.3.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pandas_config-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.5 kB
Release files / pandas_config-0.2.3.tar.gz
| Download URL | pandas_config-0.2.3.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4566003ae8577d9a70ff54e54faf724f4d1d6c248d0d87b081b88720c29665ad
|
|
BLAKE2b-256 checksum How to use checksums |
8dd3215482f7f881c44a9e03e93377dce087f564faf3cd3f9a1473a36451e60e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.21
|
Release files / pandas_config-0.2.3-py3-none-any.whl
| Download URL | pandas_config-0.2.3-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
12e2f36e239a2f60c43985739867b0e8d6f19569a9fd18519a59c379e43aedd1
|
|
BLAKE2b-256 checksum How to use checksums |
86f5da2050c648eaeeb883b4728e741c4d4eeecf35fb204a0af6a4560e34181d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.21
|