Skip to content

fix: handle dsc field in stock_individual_info_em#7292

Open
kevinlu2002 wants to merge 1 commit into
akfamily:mainfrom
kevinlu2002:codex/fix-stock-individual-info-em-dsc
Open

fix: handle dsc field in stock_individual_info_em#7292
kevinlu2002 wants to merge 1 commit into
akfamily:mainfrom
kevinlu2002:codex/fix-stock-individual-info-em-dsc

Conversation

@kevinlu2002

@kevinlu2002 kevinlu2002 commented Jun 1, 2026

Copy link
Copy Markdown

Fixes #7286.

Eastmoney's stock/get response can include a top-level dsc field. stock_individual_info_em currently removes several metadata columns before renaming the remaining columns to item and value, but it does not remove dsc. When dsc is present, the DataFrame has three columns and the rename raises:

ValueError: Length mismatch: Expected axis has 3 elements, new values have 2 elements

This change drops dsc when present, matching the existing handling for dlmkts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AKShare 接口问题报告 stock_individual_info_em column length mismatch

1 participant