Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,6 +33,14 @@ ipipeline = (
|
|
| 33 |
.reset_index(drop=True)
|
| 34 |
)
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
# Pipe to hvplot
|
| 37 |
ihvplot = ipipeline.hvplot(x='mpg', y=yaxis, by='origin', color=["#ff6f69", "#ffcc5c", "#88d8b0"], line_width=6, height=400)
|
| 38 |
|
|
@@ -40,7 +48,7 @@ ihvplot = ipipeline.hvplot(x='mpg', y=yaxis, by='origin', color=["#ff6f69", "#ff
|
|
| 40 |
template = pn.template.FastListTemplate(
|
| 41 |
title='Interactive DataFrame Dashboards with hvplot .interactive',
|
| 42 |
sidebar=[cylinders, 'Manufacturers', mfr, 'Y axis' , yaxis],
|
| 43 |
-
main=[ihvplot.panel()],
|
| 44 |
accent_base_color="#88d8b0",
|
| 45 |
header_background="#88d8b0",
|
| 46 |
)
|
|
|
|
| 33 |
.reset_index(drop=True)
|
| 34 |
)
|
| 35 |
|
| 36 |
+
# Pipe to table
|
| 37 |
+
if environment()=="server":
|
| 38 |
+
theme="fast"
|
| 39 |
+
else:
|
| 40 |
+
theme="simple"
|
| 41 |
+
|
| 42 |
+
itable = ipipeline.pipe(pn.widgets.Tabulator, pagination='remote', page_size=10)
|
| 43 |
+
|
| 44 |
# Pipe to hvplot
|
| 45 |
ihvplot = ipipeline.hvplot(x='mpg', y=yaxis, by='origin', color=["#ff6f69", "#ffcc5c", "#88d8b0"], line_width=6, height=400)
|
| 46 |
|
|
|
|
| 48 |
template = pn.template.FastListTemplate(
|
| 49 |
title='Interactive DataFrame Dashboards with hvplot .interactive',
|
| 50 |
sidebar=[cylinders, 'Manufacturers', mfr, 'Y axis' , yaxis],
|
| 51 |
+
main=[ihvplot.panel(), itable.panel],
|
| 52 |
accent_base_color="#88d8b0",
|
| 53 |
header_background="#88d8b0",
|
| 54 |
)
|