You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何将PDF中的多选题文本转换为pandas DataFrame

关于实现PDF提取多选题文本转结构化pandas DataFrame的技术咨询

想知道有没有能实现以下需求的技术方案:

  • 输入是从PDF中提取出的固定排版格式的多选题文本
  • 输出是符合指定结构的pandas DataFrame

输入文本样例(PDF提取后得到的原始内容)

1. The theory of comparative cost advantage theory was Introduced by-----
a) Alfred Marshall b) David Ricardo
c) Taussig d) Heberler
2. The Ricardo’s comparative cost theory is based on which of the following assumption
a) Common Market b) Equal cost
c) Monopoly d) Free Trade

输出DataFrame的格式要求

  • 每一行对应一道完整的多选题
  • 第一列存对应题目的题干内容
  • 后面的列按顺序依次存放该题的各个选项内容,不需要保留选项前的a)、b)这类标识
  • 最终效果参考如下示例:
题干选项1选项2选项3选项4
The theory of comparative cost advantage theory was Introduced by-----Alfred MarshallDavid RicardoTaussigHeberler
The Ricardo’s comparative cost theory is based on which of the following assumptionCommon MarketEqual costMonopolyFree Trade

内容的提问来源于stack exchange,提问作者sahil

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.10.23 00:48:04