Utils
utils
¶
Functions:¶
inputs_in_columns
¶
inputs_in_columns(
variable_names,
component,
key_prefix,
default_value: float | Mapping[str, float],
nb_columns=5,
)
Generate a list of input components according to a list of names.
The input components are placed in an array.
Parameters:
-
variable_names–A component is created for each name of this list.
-
component–The Streamlit component, either a text_input or a number_input.
-
key_prefix–The prefix applied to the key associated to the component, to ensure the key unique.
-
default_value(float | Mapping[str, float]) –The default value of the component. If passed as a
float, the value is applied to all components. If passed as a dictionary, the value is applied to each component according to its name. -
nb_columns–The number of columns of the array of components.
Source code in src\vimseo\dashboards\visualisation\utils.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |
multiselect_with_all
¶
multiselect_with_all(
key,
default_values,
in_sidebar=False,
help_: str | None = None,
)
A Streamlit container adding an All button to a multiselection.
Source code in src\vimseo\dashboards\visualisation\utils.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
st_create_model
¶
st_create_model(model_name, lc_name, **options)
A Streamlit cached data function to create a model.
Source code in src\vimseo\dashboards\visualisation\utils.py
83 84 85 86 | |