Skip to main content

ci

pypi version Python Versions PyPI - Downloads coverage GitHub Sponsors

Installation

pip install inline-snapshot-pandas

Usage

This packages provides special assert_(frame|series|index)_equal implementation which accept a snapshot as second argument.

from pandas import DataFrame
from inline_snapshot_pandas import assert_frame_equal
from inline_snapshot import snapshot


def test_assert_equal():
    df = DataFrame({"col0": [1, 2]})

    assert_frame_equal(df, snapshot())
pytest --inline-snapshot=create
from pandas import DataFrame
from inline_snapshot_pandas import assert_frame_equal
from inline_snapshot import snapshot


def test_assert_equal():
    df = DataFrame({"col0": [1, 2]})

    assert_frame_equal(
        df,
        snapshot(DataFrame([{"col0": 1}, {"col0": 2}])),
    )

Another way to use it is to call setup() in conftest.py, which replaces the implementation which pandas uses.

from inline_snapshot_pandas import setup

setup()

You can then use implementation from pandas with snapshots.

from pandas import DataFrame
from pandas.testing import assert_frame_equal
from inline_snapshot import snapshot


def test_assert_equal():
    df = DataFrame({"col0": [1, 2], "col1": [1, 5j], "col3": ["a", "b"]})

    # the second argument can be a snapshot
    assert_frame_equal(
        df,
        snapshot(
            DataFrame(
                [
                    {"col0": 1, "col1": (1 + 0j), "col3": "a"},
                    {"col0": 2, "col1": 5j, "col3": "b"},
                ]
            )
        ),
    )

Issues

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

License

Distributed under the terms of the MIT license, "inline-snapshot-pandas" is free and open source software.

Metadata

Release files for inline-snapshot-pandas 0.2.1

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

Source distribution (sdist)

Source distribution for inline-snapshot-pandas 0.2.1
File Size Uploaded Provenance Actions
inline_snapshot_pandas-0.2.1.tar.gz 163.7 kB With provenance Details for inline_snapshot_pandas-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for inline-snapshot-pandas 0.2.1
File Interpreter ABI Platform Actions
inline_snapshot_pandas-0.2.1-py3-none-any.whl Python 3 none any Details for inline_snapshot_pandas-0.2.1-py3-none-any.whl

Total release size: 167.5 kB

Release files / inline_snapshot_pandas-0.2.1.tar.gz

Download URL inline_snapshot_pandas-0.2.1.tar.gz
Size 163.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6c56496949b808955cf7bb64603e2a61b670c682d158392e4e7af9b1fcf641d3
BLAKE2b-256 checksum
How to use checksums
9f383e3ed224209aee1d399607333dbe5b8758ee308e3a02d221c86d4bda2017
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / inline_snapshot_pandas-0.2.1-py3-none-any.whl

Download URL inline_snapshot_pandas-0.2.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ca384a429a4b2fc28dc4a2ed834e162059186a02f1c4d7ae785de701444938f
BLAKE2b-256 checksum
How to use checksums
2cb95c43bd5a1cd4192c85d564e4955841cf5b00f145d3e6093bf20111d5efaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for inline-snapshot-pandas 0.2.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for inline_snapshot_pandas-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

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