Skip to content

Commit

Permalink
Fix: Address MyPy linting errors in curator.py
Browse files Browse the repository at this point in the history
Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] committed Jan 15, 2025
1 parent 593db45 commit 7d1f3e2
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,29 @@ def create_examples_annotate(self) -> List[pd.DataFrame]:
return new_dfs

def create_curator_df(self) -> pd.DataFrame:
"""Create a DataFrame containing annotated data for relevance detection.
The method processes PDF content to extract relevant data, merges it with KPI mappings,
and ensures proper formatting and column ordering. If no content is available, it returns
an empty DataFrame with the required columns.
Returns:
pd.DataFrame: A DataFrame with the following columns:
- company
- year
- source_file
- source_page
- context
- question
- kpi_id
- label
- in_extraction_data_flag
- unique_paragraph_id
- annotation_file_name
- annotation_file_row
- annotation_answer
"""
# Define the column order
columns_order = [
"company",
Expand Down

0 comments on commit 7d1f3e2

Please sign in to comment.