Spaces:
Build error
Build error
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -45,9 +45,9 @@ def app():
|
|
| 45 |
|
| 46 |
fig, ax = plt.subplots()
|
| 47 |
|
| 48 |
-
if "
|
| 49 |
-
data = df.groupby(plot["x"]).
|
| 50 |
-
|
| 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)
|