有人可以帮助我理解为什么我的代码返回一个空数据集吗?另外,我如何将这些数据存储到df中?

api = requests.post(cex_bal,data=params)

symbols = ["BTC_USD","XRP_USD","ETH_USD","BCH_USD"]


def your_function_that_computes_correlation_martrix(x):
    data = x.corr(method='pearson')
    print(data)

while True:
    for symbol in symbols:
        base,counter = symbol.split('_')[0],symbol.split('_')[1]
        tickers = requests.get(last_price.format(base,counter))
        x = tickers.json()
        percentage_pairs = x['priceChangePercentage'],x['pair']
        y = pd.DataFrame(percentage_pairs).rename(index={0:'Percentage Change',1:'Pair'})
        print(your_function_that_computes_correlation_martrix(y))
    time.sleep(5)
qq447832433 回答:有人可以帮助我理解为什么我的代码返回一个空数据集吗?另外,我如何将这些数据存储到df中?

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3135209.html

大家都在问