AMKhakbaz commited on
Commit
51f8c99
·
verified ·
1 Parent(s): f0b85fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -22,16 +22,16 @@ def edit_strings(string_list):
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":
 
22
  edited_list.append(string)
23
  return edited_list
24
 
25
+ def equalize_list_lengths(input_dict):
26
+ max_len = 0
27
+ for key in input_dict:
28
+ max_len = max(max_len, len(input_dict[key]))
29
+
30
+ for key in input_dict:
31
+ while len(input_dict[key]) < max_len:
32
+ input_dict[key].append(None)
33
+
34
+ return pd.DataFrame(input_dict)
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":