Update app.py
Browse files
app.py
CHANGED
|
@@ -880,7 +880,7 @@ def generate_ai_insights():
|
|
| 880 |
|
| 881 |
# Check for date columns
|
| 882 |
date_cols = []
|
| 883 |
-
for col in df.columns:
|
| 884 |
if df[col].dtype == 'object':
|
| 885 |
try:
|
| 886 |
pd.to_datetime(df[col])
|
|
@@ -1309,7 +1309,7 @@ def display_distribution_tab():
|
|
| 1309 |
|
| 1310 |
# Show highest correlations
|
| 1311 |
corr_df = corr_matrix.stack().reset_index()
|
| 1312 |
-
corr_df.columns = ['Variable 1', 'Variable 2', 'Correlation']
|
| 1313 |
corr_df = corr_df[corr_df['Variable 1'] != corr_df['Variable 2']]
|
| 1314 |
corr_df = corr_df.sort_values('Correlation', ascending=False).head(5)
|
| 1315 |
|
|
|
|
| 880 |
|
| 881 |
# Check for date columns
|
| 882 |
date_cols = []
|
| 883 |
+
for col in df.columns.tolist():
|
| 884 |
if df[col].dtype == 'object':
|
| 885 |
try:
|
| 886 |
pd.to_datetime(df[col])
|
|
|
|
| 1309 |
|
| 1310 |
# Show highest correlations
|
| 1311 |
corr_df = corr_matrix.stack().reset_index()
|
| 1312 |
+
corr_df.columns.tolist() = ['Variable 1', 'Variable 2', 'Correlation']
|
| 1313 |
corr_df = corr_df[corr_df['Variable 1'] != corr_df['Variable 2']]
|
| 1314 |
corr_df = corr_df.sort_values('Correlation', ascending=False).head(5)
|
| 1315 |
|