pandas Python打印带有错误的比较结果

gv8xihay  于 2022-12-25  发布在  Python
关注(0)|答案(1)|浏览(99)

我尝试打印包含比较结果的语句,但在扫描文字错误时出现EOL

prod = df_merge[df_merge["_merge"]=="left_only"]
len(prod)
prod 1= df_merge[df_merge["_merge"]=="right_only"]
len(prod1)
prod_results = ("""compares two tables, records in prod only are""" "+str(len(prod)+"  """and records in prod1 are:  "  +str(len(prod)+" )"""

我想在+str(len(prod)+”处显示数字

m1m5dgzv

m1m5dgzv1#

我想这是你的本意

prod_results = "compares two tables, records in prod only are " + str(len(prod)) + " and records in prod1 are: " + str(len(prod))

相关问题