operate_load_poi_data.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:didi_competition 作者: Heipiao 项目源码 文件源码
def remove_error_poi_each_line(line_data):
    ## from 1 to len(..), because the first one is district hash
    ### why I need a temp_line_data here!!!!
    ### Please see the property of the remove() function

    standard_style = re.compile(r"\d+#\d+:\d+")

    line_data = list(line_data[0])
    temp_line_data = line_data.copy()
    for poi_in_line in temp_line_data:
        if len(poi_in_line) == 32: # this is the district hash
            continue
        if not re.match(standard_style, poi_in_line):
            #print(poi_in_line)
            line_data.remove(poi_in_line)
    return pd.Series([line_data])

# the input line_data is a serise!!
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号