RDA9527 commited on
Commit
8984162
·
verified ·
1 Parent(s): 38e6711

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,9 +45,9 @@ def app():
45
 
46
  fig, ax = plt.subplots()
47
 
48
- if "top" in plot["title"]:
49
- data = df.groupby(plot["x"]).quantity.sum().reset_index().sort_values(by="quantity", ascending=False).head()
50
- sns.countplot(x=plot["x"], data=data, ax=ax)
51
 
52
  if "Quantity" in plot["title"]:
53
  sns.countplot(x=plot["x"], hue=plot["hue"], data=df, ax=ax)
 
45
 
46
  fig, ax = plt.subplots()
47
 
48
+ if "Top" in plot["title"]:
49
+ data = df.groupby(plot["x"])[plot["y"]].sum().reset_index().sort_values(by=plot["y"], ascending=False).head(plot["top"])
50
+ ax.bar(data.index, data.values)
51
 
52
  if "Quantity" in plot["title"]:
53
  sns.countplot(x=plot["x"], hue=plot["hue"], data=df, ax=ax)