Module pandas_profiling.report.presentation.core.image

Expand source code
from typing import Any

from pandas_profiling.report.presentation.abstract.item_renderer import ItemRenderer


class Image(ItemRenderer):
    def __init__(self, image, image_format, alt, caption=None, **kwargs):
        super().__init__(
            "image",
            {
                "image": image,
                "image_format": image_format,
                "alt": alt,
                "caption": caption,
            },
            **kwargs
        )

    def __repr__(self):
        return "Image"

    def render(self) -> Any:
        raise NotImplementedError()

Classes

class Image (image, image_format, alt, caption=None, **kwargs)

Helper class that provides a standard way to create an ABC using inheritance.

Expand source code
class Image(ItemRenderer):
    def __init__(self, image, image_format, alt, caption=None, **kwargs):
        super().__init__(
            "image",
            {
                "image": image,
                "image_format": image_format,
                "alt": alt,
                "caption": caption,
            },
            **kwargs
        )

    def __repr__(self):
        return "Image"

    def render(self) -> Any:
        raise NotImplementedError()

Ancestors

Subclasses

Methods

def render(self)
Expand source code
def render(self) -> Any:
    raise NotImplementedError()