Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ else:
|
|
| 65 |
# Display the first 5 rows of the dataframe in an editable grid
|
| 66 |
grid_response = AgGrid(
|
| 67 |
df.head(5),
|
| 68 |
-
|
| 69 |
editable=True,
|
| 70 |
height=300,
|
| 71 |
width='100%',
|
|
@@ -140,8 +140,6 @@ else:
|
|
| 140 |
fig = px.line(df, x=df.index, y=column, title=f"Graph of column '{column}'")
|
| 141 |
st.plotly_chart(fig, use_container_width=True)
|
| 142 |
st.success(f"Here is the graph of column '{column}'.")
|
| 143 |
-
else:
|
| 144 |
-
st.warning(f"Column '{column}' not found in the data.")
|
| 145 |
|
| 146 |
# Stop further execution after generating the graph
|
| 147 |
st.stop() # This halts further execution
|
|
|
|
| 65 |
# Display the first 5 rows of the dataframe in an editable grid
|
| 66 |
grid_response = AgGrid(
|
| 67 |
df.head(5),
|
| 68 |
+
fit_columns_on_grid_load=True, # Correct parameter to fit columns on grid load
|
| 69 |
editable=True,
|
| 70 |
height=300,
|
| 71 |
width='100%',
|
|
|
|
| 140 |
fig = px.line(df, x=df.index, y=column, title=f"Graph of column '{column}'")
|
| 141 |
st.plotly_chart(fig, use_container_width=True)
|
| 142 |
st.success(f"Here is the graph of column '{column}'.")
|
|
|
|
|
|
|
| 143 |
|
| 144 |
# Stop further execution after generating the graph
|
| 145 |
st.stop() # This halts further execution
|