当我尝试运行类中描述的异步函数时,我收到此错误
masterClass.js
class MasterClass{
async function updateData(a, b){
let [ res1, res2 ] = await Promise.all(call1, call2);
return [ res1, res2 ]
}
}
Run Code Online (Sandbox Code Playgroud)
test.js
const MasterClass = require('./MasterClass.js')
let m = new MasterClass()
m.updateData(a, b)
Run Code Online (Sandbox Code Playgroud)
错误
async function updateData(a, b){
^^^^^^^^^^
SyntaxError: Unexpected identifier
Run Code Online (Sandbox Code Playgroud) 如果我将 Pandas 数据透视表导出到 CSV 表,我会得到
first second
bar one A 0.721555
B -0.706771
two A -1.039575
B 0.271860
baz one A -0.424972
B 0.567020
two A 0.276232
B -1.087401
Run Code Online (Sandbox Code Playgroud)
因为我正在 Excel 中处理这些数据,所以我会重复所有行,例如
first second
bar one A 0.721555
bar one B -0.706771
bar two A -1.039575
bar two B 0.271860
baz one A -0.424972
baz one B 0.567020
baz two A 0.276232
baz two B -1.087401
Run Code Online (Sandbox Code Playgroud)
你知道这怎么可能吗?
from lxml import html
import requests
url = "https://website.com/"
page = requests.get(url)
tree = html.fromstring(page.content)
page.content
Run Code Online (Sandbox Code Playgroud)
-> SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败 (_ssl.c:748)
我运行此脚本,但出现此错误。我该怎么做?