Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/309.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何显示公司内部API中的地址字符串_Python_Json_Jupyter Notebook - Fatal编程技术网

Python 如何显示公司内部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

由于在该列中出现“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_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不是一个数字)。如果这可能是问题所在,您将如何修复浮点值?