Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,6 +22,17 @@ def edit_strings(string_list):
|
|
22 |
edited_list.append(string)
|
23 |
return edited_list
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
def figo(plot_type, df, title, xlabel=None, ylabel=None, legend_title=None, colorscale='Plotly3', width=800, height=600):
|
26 |
if plot_type == "Scatter":
|
27 |
fig = go.Figure()
|
|
|
22 |
edited_list.append(string)
|
23 |
return edited_list
|
24 |
|
25 |
+
def edit_strings(string_list):
|
26 |
+
edited_list = []
|
27 |
+
for string in string_list:
|
28 |
+
if "_" in string:
|
29 |
+
last_underscore_index = string.rfind("_")
|
30 |
+
edited_string = string[:last_underscore_index]
|
31 |
+
edited_list.append(edited_string)
|
32 |
+
else:
|
33 |
+
edited_list.append(string)
|
34 |
+
return edited_list
|
35 |
+
|
36 |
def figo(plot_type, df, title, xlabel=None, ylabel=None, legend_title=None, colorscale='Plotly3', width=800, height=600):
|
37 |
if plot_type == "Scatter":
|
38 |
fig = go.Figure()
|