不是你的问题,是 sina 的接口变了,使用官方用例依然报错:
import akshare as ak
futures_zh_spot_df = ak.futures_zh_spot(symbol='V2205', market="CF", adjust='0')
print(futures_zh_spot_df)
try:
--> 418 data_df.columns = [
419 "symbol",
420 "time",
421 "open",
422 "high",
423 "low",
424 "last_close",
425 "bid_price",
426 "ask_price",
427 "current_price",
428 "avg_price",
429 "last_settle_price",
430 "buy_vol",
431 "sell_vol",
432 "hold",
433 "volume",
434 "_",
435 "_",
436 "_",
437 "_",
438 "_",
...
99 f"Length mismatch: Expected axis has {old_len} elements, new "
100 f"values have {new_len} elements"
101 )
|