优化排片占比

main
rogersun 1 week ago
parent 81645e1ce3
commit 431c706e57
  1. 2
      ai/utils/basic_func.py

@ -153,5 +153,5 @@ def count_show(show_data):
show_dict = dict(sorted(show_dict.items(), key=lambda item: item[1], reverse=True)) show_dict = dict(sorted(show_dict.items(), key=lambda item: item[1], reverse=True))
show_count = [] show_count = []
for show, count in show_dict.items(): for show, count in show_dict.items():
show_count.append(show + '' + str(round(count/len(show_data) * 100, 2))+'%') show_count.append(f"{show}{str(round(count / len(show_data) * 100, 2))}%,共排{str(count)}")
return '\n'.join(show_count) return '\n'.join(show_count)
Loading…
Cancel
Save