Skip to content

Commit

Permalink
feat: flag parcels equal to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Neemann authored and steveoh committed Apr 10, 2023
1 parent e912ccb commit 59f0db3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions row.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,6 +1139,12 @@ def filter_results(previous_results_file, out_dir):

working_df = _filter_five_number_run(working_df)

#: remove parcels where text = '0'
working_df["zero"] = "pass"
mask = working_df["text"] == "0"
working_df.loc[mask, "keep"] = "no"
working_df.loc[mask, "zero"] = "fail"
logging.info("Number of parcels equal to 0 flagged: %i", mask.value_counts()[1])
#: save all results
#: save results to CSV
out_file_all = out_dir / f"final-all-ocr-results-{datetime.now().strftime('%Y-%m-%d-%H-%M')}.csv"
Expand Down

0 comments on commit 59f0db3

Please sign in to comment.