本文主要是介绍dataframe 筛选数据字段包涵数据,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
筛选某个字段包含某个字符:
def clear_douhao():data_client = get_template_client_base("09090641-9559-4e77-a3c8-227740e43937")target_df = data_client.data_select(to_df=True)need_df = target_df[target_df["土地编码"].apply(lambda x: "," in x if isinstance(x, str) else False)]# need_df = target_df.filter(regex='e$', axis=1)# need_df = target_df["土地编码"].contains(",")# print(need_df)need_df["土地编码"] = need_df["土地编码"].apply(lambda x: x.replace(",", ","))# print(need_df)data_client.data_update_separate(need_df)
这篇关于dataframe 筛选数据字段包涵数据的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!