Skip to content

Pdfblocks

flowtask.components.LangchainLoader.loaders.pdfblocks

PDFBlocks

PDFBlocks(table_settings={}, **kwargs)

Bases: BasePDF

Load a PDF Table as Blocks of text.

get_markdown

get_markdown(df)

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

unique_columns(df)

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.