Pdfblocks¶
flowtask.components.LangchainLoader.loaders.pdfblocks
¶
PDFBlocks
¶
Bases: BasePDF
Load a PDF Table as Blocks of text.
get_markdown
¶
Convert a DataFrame to a Markdown string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The DataFrame to convert. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
The JSON string. |
unique_columns
¶
Rename duplicate columns in the DataFrame to ensure they are unique.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
df
|
DataFrame
|
The DataFrame with potential duplicate column names. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.DataFrame: A DataFrame with unique column names. |