updated width of table
Browse files
utils.py
CHANGED
@@ -161,13 +161,13 @@ def create_data_input_table(data, col_names):
|
|
161 |
data[7:12] = [bool(value) for value in data[7:12]]
|
162 |
rounded_list = [round(value, 2) if isinstance(value, float) else value for value in data]
|
163 |
df = pd.DataFrame({"Feature name": col_names, "Value": rounded_list })
|
164 |
-
st.dataframe(df, hide_index=True, width=
|
165 |
|
166 |
# Create a function to generate a table
|
167 |
def create_table(texts, values, weights, title):
|
168 |
df = pd.DataFrame({"Feature Explanation": texts, 'Value': values, 'Weight': weights})
|
169 |
st.markdown(f'#### {title}') # Markdown for styling
|
170 |
-
st.dataframe(df, hide_index=True, width=
|
171 |
'Weight': st.column_config.ProgressColumn(
|
172 |
'Weight',
|
173 |
width='small',
|
|
|
161 |
data[7:12] = [bool(value) for value in data[7:12]]
|
162 |
rounded_list = [round(value, 2) if isinstance(value, float) else value for value in data]
|
163 |
df = pd.DataFrame({"Feature name": col_names, "Value": rounded_list })
|
164 |
+
st.dataframe(df, hide_index=True, width=475, height=35*len(df)+38) # use_container_width=True
|
165 |
|
166 |
# Create a function to generate a table
|
167 |
def create_table(texts, values, weights, title):
|
168 |
df = pd.DataFrame({"Feature Explanation": texts, 'Value': values, 'Weight': weights})
|
169 |
st.markdown(f'#### {title}') # Markdown for styling
|
170 |
+
st.dataframe(df, hide_index=True, width=475, column_config={
|
171 |
'Weight': st.column_config.ProgressColumn(
|
172 |
'Weight',
|
173 |
width='small',
|