pandas 模糊查询

def search(df, column, keywords):
    """
    Pandas fuzzy search
    :param df: pandas dataframe
    :param column: the name of column
    :param keywords: the key words of your search
    :return: [true, false,...,true] list
    """
    return df[column].str.contains(keywords)
posted @ 2021-06-01 10:23  bH1pJ  阅读(184)  评论(0编辑  收藏  举报