Vera-ZWY commited on
Commit
9fc9533
1 Parent(s): 8edaa73

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- # df = pd.read_csv(StringIO(pivot_table), delim_whitespace=True, index_col=0)
55
 
56
  plt.figure(figsize=(10, 8))
57
- sns.heatmap(pivot_table,
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)