Skip to content

Commit

Permalink
Removing NaN values from JSON response.
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckinghamAJ committed Sep 24, 2024
1 parent 4129b3a commit da87fc6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/fbo_scraper/get_opps.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,9 @@ def transform_opps(opps, out_path, skip_attachments=False):
# Removing duplicate solicitation numbers resulting in a unique solNum constraint violation
df = pd.DataFrame(transformed_opps)
df.drop_duplicates(subset=['solnbr'], inplace=True)
# Removing NaN values from the dataframe
df = df.where(pd.notnull(df), None)

transformed_opps = df.to_dict('records')

return transformed_opps
Expand Down

0 comments on commit da87fc6

Please sign in to comment.