![](/img/trans.png)
[英]How do you take a function from an excel spreadsheet and run it with python?
[英]How do you run an excel function from within Python?
我們正在使用 excel 插件從 API 中提取一些數據。 我們的 excel 文件包含一個帶有實體標識符的列,我們使用 excel 公式從 Internet 中提取該實體的數據。
是否可以從 Python 中運行它?
I could export my pd.DataFrame
to csv, open it with excel, append the data I want, and read it back into pandas... but is there a quicker way?
您可以使用 Json() 方法導入請求並提取數據
import pandas as pd
import requests
url = 'https://api.covid19api.com/summary'
r = requests.get(url)
json = r.json()
json
然后你有數據,只需要包含在你的 dataframe
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.