We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instead of erroring this says:
(<div class="form-group shiny-input-container"> <label class="control-label" id="n-label" for="n">Number of rows to display</label><input id="n" type="number" class="shiny-input-number form-control" value="20"/> </div>,)
https://shinylive.io/py/editor/#code=NobwRAdghgtgpmAXGKAHVA6VBPMAaMAYwHsIAXOcpMAMwCdiYACAZwAsBLCbJjmVYnTJM6cKITIcAbnDwjKAEzh05AVw4AdCHwFCmqKBAVQWTE-oVb6jVp24Y4AD1SiWpnYOFdUqsnIA2UNjEvlphEOoY3r4A+hHwdByEABQakGlyaQByqjAARspMxDQixADupmTETAocLKiB2BlMAEwADACUeOFaAAKiRsoYxmRQMfSwcExaSiWolADm6hAsMQo0yR2IWky7NSUAvBYYACJQowBidJPJIDt7DwDkAIKPiEzAAIxyLXIAzABdboQB5PABCbw+ABY5ABWOQANiB91BTEeAGFIcAAOxyAAccgAnACUUwAL4dUmiMiqOgg9ZgMkAoA
The text was updated successfully, but these errors were encountered:
I see what the problem is. This is the line in question:
ui.input_numeric("n", "Number of rows to display", 20),
In Python, the trailing comma there is shorthand for a creating a tuple with just one element, so that line is equivalent to:
(ui.input_numeric("n", "Number of rows to display", 20), )
So it's not Shiny doing anything weird here -- it's just Python itself supporting a strange syntax.
Full app for reference:
from shiny import reactive, render, ui import pandas as pd from shiny.express import input, layout ui.input_numeric("n", "Number of rows to display", 20), @render.data_frame def penguins_df(): df = pd.DataFrame({ 'A': [1, 2, 3], 'B': [4, 5, 6], 'C': [7, 8, 9] }) return df
Sorry, something went wrong.
No branches or pull requests
Instead of erroring this says:
https://shinylive.io/py/editor/#code=NobwRAdghgtgpmAXGKAHVA6VBPMAaMAYwHsIAXOcpMAMwCdiYACAZwAsBLCbJjmVYnTJM6cKITIcAbnDwjKAEzh05AVw4AdCHwFCmqKBAVQWTE-oVb6jVp24Y4AD1SiWpnYOFdUqsnIA2UNjEvlphEOoY3r4A+hHwdByEABQakGlyaQByqjAARspMxDQixADupmTETAocLKiB2BlMAEwADACUeOFaAAKiRsoYxmRQMfSwcExaSiWolADm6hAsMQo0yR2IWky7NSUAvBYYACJQowBidJPJIDt7DwDkAIKPiEzAAIxyLXIAzABdboQB5PABCbw+ABY5ABWOQANiB91BTEeAGFIcAAOxyAAccgAnACUUwAL4dUmiMiqOgg9ZgMkAoA
The text was updated successfully, but these errors were encountered: