[英]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.