Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolinmorgan committed Mar 28, 2024
1 parent ab15c39 commit 090188a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions DOTS/pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ def pull_lobstr_gdoc(pull=1):
# if the story text is already gathered, process and return in list of lists format
if len(articles) == len(df):
logging.info("Using cached lobstr data")
df = articles.dropna()
df = df[df['text'].apply(lambda x: (x) !="[]")]
df.reset_index(inplace=True)
try:
df = articles.dropna()
df = df[df['text'].apply(lambda x: (x) !="[]")]
df.reset_index(inplace=True)
except:
df = articles

# otherwise gather the story text from the URLs and save to parquet so that subsequent runs dont need to request again
else:
Expand Down

0 comments on commit 090188a

Please sign in to comment.