Pdf table
PDFTableReader #
Bases: BaseReader
PDF表格阅读器。从PDF中读取表格。
Parameters:
Name | Type | Description | Default |
---|---|---|---|
row_separator |
str
|
用于连接DataFrame行的行分隔符。 |
'\n'
|
col_separator |
str
|
用于连接DataFrame列的列分隔符。 |
', '
|
Source code in llama_index/readers/pdf_table/base.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
|
load_data #
load_data(
file: Path,
pages: str = "1",
extra_info: Optional[Dict] = None,
) -> List[Document]
加载数据并从PDF文件中提取表格。
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file |
Path
|
PDF文件的路径。 |
required |
pages |
str
|
从中读取表格的页面。 |
'1'
|
extra_info |
Optional[Dict]
|
额外信息。 |
None
|
Returns:
Type | Description |
---|---|
List[Document]
|
List[Document]: 文档列表。 |
Source code in llama_index/readers/pdf_table/base.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|