Module pandas_profiling.report.presentation.flavours.widget.toggle_button
Expand source code
from ipywidgets import widgets
from pandas_profiling.report.presentation.core import ToggleButton
class WidgetToggleButton(ToggleButton):
def render(self):
toggle = widgets.ToggleButton(description=self.content["text"])
toggle.layout.width = "fit-content"
toggle_box = widgets.HBox([toggle])
toggle_box.layout.align_items = "flex-end"
toggle_box.layout.display = "flex"
toggle_box.layout.flex_flow = "column"
toggle_box.layout.width = "100%"
return toggle_box
Classes
-
Helper class that provides a standard way to create an ABC using inheritance.
Expand source code
class WidgetToggleButton(ToggleButton): def render(self): toggle = widgets.ToggleButton(description=self.content["text"]) toggle.layout.width = "fit-content" toggle_box = widgets.HBox([toggle]) toggle_box.layout.align_items = "flex-end" toggle_box.layout.display = "flex" toggle_box.layout.flex_flow = "column" toggle_box.layout.width = "100%" return toggle_box
Ancestors
- ToggleButton
- ItemRenderer
- Renderable
- abc.ABC
Methods
-
Expand source code
def render(self): toggle = widgets.ToggleButton(description=self.content["text"]) toggle.layout.width = "fit-content" toggle_box = widgets.HBox([toggle]) toggle_box.layout.align_items = "flex-end" toggle_box.layout.display = "flex" toggle_box.layout.flex_flow = "column" toggle_box.layout.width = "100%" return toggle_box