Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,7 +53,14 @@ if submit_button:
|
|
| 53 |
st.pyplot(fig)
|
| 54 |
|
| 55 |
df.reset_index(inplace=True)
|
| 56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
|
| 58 |
|
| 59 |
# Let's understand the 100 days moving average along with 200 days moving average
|
|
|
|
| 53 |
st.pyplot(fig)
|
| 54 |
|
| 55 |
df.reset_index(inplace=True)
|
| 56 |
+
|
| 57 |
+
# Determine which columns to drop based on their existence in the DataFrame
|
| 58 |
+
cols_to_drop = ['Date']
|
| 59 |
+
if 'Adj Close' in df.columns:
|
| 60 |
+
cols_to_drop.append('Adj Close')
|
| 61 |
+
|
| 62 |
+
df.drop(cols_to_drop, axis=1, inplace=True)
|
| 63 |
+
|
| 64 |
|
| 65 |
|
| 66 |
# Let's understand the 100 days moving average along with 200 days moving average
|