返回列表 发帖

[问题求助] 【己解决】Python代码出错,20元求助!

本帖最后由 keshun 于 2020-11-1 23:34 编辑
# ! -*- coding:utf-8
import pandas as pd
import requests
import json, time, re, os
import numpy as np
from datetime import datetime
api_url = "https://www"
html = requests.get(api_url)
datas = pd.DataFrame()
for i in json.loads(html.text)["data"]["asks"]:
    df_insert = pd.DataFrame(
        {'a': i[0], 'b': i[1], 'c': i[2]}, index=[0])
    datas = datas.append(df_insert)
print(datas)
input("暂停")COPY
20元有偿求助高手修改代码,提取['data']['asks']与['data']['bids']下的3列纯数字串,谢谢!

此帖仅作者可见
提供bat代写,为你省时省力省事,支付宝扫码头像支付
微信: unique2random

TOP

此帖仅作者可见

TOP

返回列表