From c4496e6cf2eaa27f2b5b4ba2698a807030ad07c7 Mon Sep 17 00:00:00 2001 From: Will Date: Thu, 28 Aug 2025 21:13:47 +0800 Subject: [PATCH] chore: use DataFrame.map instead of deprecated DataFrame.applymap (#24726) --- api/core/workflow/nodes/document_extractor/node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/core/workflow/nodes/document_extractor/node.py b/api/core/workflow/nodes/document_extractor/node.py index a61e6ba4a..b820999c3 100644 --- a/api/core/workflow/nodes/document_extractor/node.py +++ b/api/core/workflow/nodes/document_extractor/node.py @@ -515,14 +515,14 @@ def _extract_text_from_excel(file_content: bytes) -> str: df.dropna(how="all", inplace=True) # Combine multi-line text in each cell into a single line - df = df.applymap(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # type: ignore + df = df.map(lambda x: " ".join(str(x).splitlines()) if isinstance(x, str) else x) # Combine multi-line text in column names into a single line df.columns = pd.Index([" ".join(str(col).splitlines()) for col in df.columns]) # Manually construct the Markdown table markdown_table += _construct_markdown_table(df) + "\n\n" - except Exception as e: + except Exception: continue return markdown_table except Exception as e: