Python 如何显示公司内部API中的地址字符串
由于在该列中出现“nan”消息,我如何显示公司内部api文档中的地址字符串Python 如何显示公司内部API中的地址字符串,python,json,jupyter-notebook,Python,Json,Jupyter Notebook,由于在该列中出现“nan”消息,我如何显示公司内部api文档中的地址字符串 ''' for index, row in df.iterrows(): company_number = row["Company_Number"] ch_profile = ch_api.get_company_profile(company_number) df.at[index, "Company_Name"] = ch_profile.get("company
'''
for index, row in df.iterrows():
company_number = row["Company_Number"]
ch_profile = ch_api.get_company_profile(company_number)
df.at[index, "Company_Name"] = ch_profile.get("company_name", None)
df.at[index, "address"] = ch_profile.get("address_line_1", None)
print(f"Number: {row['Company_Number']} | Name: {df.at[index,'Company_Name']} | Test: {df.at[index,'address']}")
'''
编号:09628959 |名称:种植承诺有限公司|测试:nan
使用CHR:不熟悉api,但看起来好像有什么东西被转换成了一个不应该转换的浮点值(NaN不是一个数字)。如果这可能是问题所在,您将如何修复浮点值?