Skip to main content

DataFrame Mapper

THIS IS EXPERIMENTAL.

Requirements

  • Python 3.5+

  • Pandas 0.20.0+

Installation

Install DataFrame Mapper via pip:

$ pip install dataframe-mapper

Example

Simple DataFrame Mapper example:

from dfmapper import DataFrameMapper, IntColumn, StrColumn

class UserDfm(DataFrameMapper):

    id = IntColumn(min=1, nullable=False)
    username = StrColumn(max_length=30, nullable=False)
    profile = StrColumn()

    def find_by_id(self, id):
        return self.df[self.df.id == id]

user_dfm = UserDfm({
    "id": [1, 2, 3],
    "username": ["Bessie Bennett", "Sandra Matthews", "Jessie Bates"],
    "profile": ["BLAH BLAH BLAH", "PITH PITH PITH", None]
})

user_dfm.is_valid()
#: True

user_dfm.find_by_id(1)
#:    id username       profile
#: 0  1  Bessie Bennett BLAH BLAH BLAH

License

DataFrame Mapper is licensed under MIT License. See LICENSE for more information.

Metadata

Release files for dataframe-mapper 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dataframe-mapper 0.0.3
File Size Uploaded Provenance Actions
dataframe-mapper-0.0.3.tar.gz 5.7 kB Without provenance Details for dataframe-mapper-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dataframe-mapper 0.0.3
File Interpreter ABI Platform Actions
dataframe_mapper-0.0.3-py3-none-any.whl Python 3 none any Details for dataframe_mapper-0.0.3-py3-none-any.whl

Total release size: 12.3 kB

Release files / dataframe-mapper-0.0.3.tar.gz

Download URL dataframe-mapper-0.0.3.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d3a04d0daf28a212d7fc8f96da73642c0dd9db959f613bd5054b8d1b780212b9
BLAKE2b-256 checksum
How to use checksums
e5a94ba8ea5d597d1901dcbdbf07c99a2840ffa6b7f7729bbc5c9bf701d5a548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / dataframe_mapper-0.0.3-py3-none-any.whl

Download URL dataframe_mapper-0.0.3-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
440f4116990076490ce4bd29bb7fc373d390a8477eb1985c8e05068b24c5dda8
BLAKE2b-256 checksum
How to use checksums
b75820cce8519337744ff386b98b846c4649c1db65b732a639f96416ae5182c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for dataframe-mapper 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page