Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,12 @@ def calculate_kpis(df):
|
|
89 |
def get_pandas_profile(df):
|
90 |
profile = ProfileReport(df, title="Profiling Report")
|
91 |
json_profile = profile.to_json()
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
def generateResponse(dataFrame,prompt):
|
95 |
llm = GoogleGemini(api_key=gemini_api_key)
|
|
|
89 |
def get_pandas_profile(df):
|
90 |
profile = ProfileReport(df, title="Profiling Report")
|
91 |
json_profile = profile.to_json()
|
92 |
+
dict_p = json.loads(json_profile)
|
93 |
+
keys_to_keep = ['analysis', 'table', 'correlations', 'alerts', 'sample']
|
94 |
+
|
95 |
+
# Assuming your dictionary is named 'my_dict'
|
96 |
+
filtered_dict = {key: dict_p[key] for key in keys_to_keep}
|
97 |
+
return filtered_dict
|
98 |
|
99 |
def generateResponse(dataFrame,prompt):
|
100 |
llm = GoogleGemini(api_key=gemini_api_key)
|