Python – TypeError:“int64”類型的對像不是 JSON 可序列化的

| | | |

我有一個存儲商店名稱和每日銷售額的數據框。我正在嘗試使用下面的 Python 腳本將其插入 Salesforce。

但是,我收到以下錯誤:

TypeError:“int64”類型的對像不是 JSON可序列化的

下面是數據框的視圖

Storename,Count Store A,10 Store B,12 Store C,5 

代碼>

我使用以下代碼將其插入到 Salesforce。

update_list = [] for i in range(len(store)): update_data = { "name ": store["entity_name"].iloc[i], "count__c": store["count"].iloc[i] } update_list.append(update_data) sf_data_cursor = sf_datapull.salesforce_login() sf_data_cursor.bulk.Account.update (update_list) 

執行上面的最後一行時出現錯誤。

如何解決這個問題?

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method