Skip to main content

Configure pandas options simply from an INI file.

Project description

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:

uv add pandas-config

Usage

The main module configfile.py contains a load() function that loads pandas configurations from an INI file.

Basic Example

  1. Create a .pandas.ini configuration file:
[display]
width = 200
max_colwidth = 25
max_columns = 20
min_rows = 20
precision = 3

[display.html]
border = 4
  1. 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.ini
  • encoding (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])

Dependencies

  • pandas
  • Python 3.x

Notes

  • Values in the configuration file must be valid Python literals (evaluated using ast.literal_eval())
  • The default configuration file is .pandas.ini in the current directory
  • If no file is found at the specified location, no error will be raised

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

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

pandas_config-0.2.0.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

pandas_config-0.2.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file pandas_config-0.2.0.tar.gz.

File metadata

  • Download URL: pandas_config-0.2.0.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.21

File hashes

Hashes for pandas_config-0.2.0.tar.gz
Algorithm Hash digest
SHA256 69d000e1c903b697ffd464e76717c493048ce7c96a11fc6a9a5cab90c329186c
MD5 a378a867ddd084fd0e9503c0c53bc1ed
BLAKE2b-256 37190bb6787cb8d3a22fe4dbd825439a997f3d8b514241dfbd79daba440930e6

See more details on using hashes here.

File details

Details for the file pandas_config-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pandas_config-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b39dab09d08ab2dd14339684bcdec9a50fa347af42faa03b0adc7d0d3067c38
MD5 b6b56a314d2f898a372ad906b742a157
BLAKE2b-256 7eec6699a3c2182207e575703f49926d48e9dc8c8e65c8aea0624bb0d1b4631f

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