Update app.py
Browse files
app.py
CHANGED
@@ -49,12 +49,12 @@ def heatmap(top_n):
|
|
49 |
api_name="/get_heatmap_pivot_table"
|
50 |
)
|
51 |
print(pivot_table)
|
52 |
-
print(type(pivot_table))
|
53 |
|
54 |
-
|
55 |
|
56 |
plt.figure(figsize=(10, 8))
|
57 |
-
sns.heatmap(
|
58 |
cmap='YlOrRd',
|
59 |
cbar_kws={'label': 'Weighted Frequency'},
|
60 |
square=True)
|
|
|
49 |
api_name="/get_heatmap_pivot_table"
|
50 |
)
|
51 |
print(pivot_table)
|
52 |
+
print(type(pivot_table)) # it's a dict
|
53 |
|
54 |
+
df = pd.DataFrame.from_dict(pivot_table)
|
55 |
|
56 |
plt.figure(figsize=(10, 8))
|
57 |
+
sns.heatmap(df,
|
58 |
cmap='YlOrRd',
|
59 |
cbar_kws={'label': 'Weighted Frequency'},
|
60 |
square=True)
|