Skip to content

Commit

Permalink
stocks/fa/analysis returns empty dataframe instead of error when no d…
Browse files Browse the repository at this point in the history
…ata (#3858)

* stocks/fa/analysis returns empty dataframe instead of error when no data

* lint

Co-authored-by: James Maslek <[email protected]>
  • Loading branch information
skhan877 and jmaslek authored Jan 4, 2023
1 parent cf1603a commit 1af3ff7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ def resultMapper(a):

return resultMapper

if len(response_dict) == 0:
return pd.DataFrame()

risk = pd.DataFrame(
map(resultGroupMapper("Risk factors"), response_dict[0]["rf_highlights"]),
columns=["Group", "Good", "Sentence"],
Expand Down

0 comments on commit 1af3ff7

Please sign in to comment.