摘要:
A string is happy if every three consecutive characters are distinct. def check_if_string_is_happy1(input_str): check = [] for a,b,c in zip(input_str, 阅读全文
摘要:
groupby是Pandas用于根据给定列中的不同值对数据点(即行)进行分组,分组后的数据可以计算生成组的聚合值。 agg 聚合操作 聚合操作是groupby后非常常见的操作,聚合操作可以用来求和、均值、最大值、最小值等. 函数 用途 函数 用途 min 最小值 max 最大值 sum 求和 mea 阅读全文
摘要:
import re content = [] srt = [] with open('input.vtt','r') as open_file: for lines in open_file: lines = lines.replace('WEBVTT','') #删除WEBVTT # vtt文件中 阅读全文