bug fix test2

This commit is contained in:
Bin Yang
2021-04-12 14:36:04 -04:00
parent c6a79f429d
commit d7d7c3033a
+2 -4
View File
@@ -64,8 +64,6 @@ def search_repo_multiple_terms(term_list: List[str],
repo_df = convert_repo_list_to_df(repo_list, category)
repo_df_list.append(repo_df)
combined_df = pd.concat(repo_df_list).reset_index(drop=True)
print('search_repo_multiple_terms')
print(combined_df)
if drop_duplicate:
combined_df = combined_df.drop_duplicates()
combined_df['finml_added_date'] = datetime.datetime.now()
@@ -138,6 +136,7 @@ def search_new_repo_by_category(category: str,
>>> min_stars_number = 100
>>> existing_repo_df = get_repo_list()
"""
print('*** searching for category [{}] ***'.format(category))
combined_df = None
if category == 'Deep Learning And Reinforcement Learning':
combined_df = search_repo_multiple_terms(['deep learning trading',
@@ -186,8 +185,7 @@ def search_new_repo_by_category(category: str,
)
# only find ones that need to be inserted
if combined_df is not None and existing_repo_df is not None:
print(combined_df)
if combined_df is not None and not combined_df.empty and existing_repo_df is not None:
combined_df = combined_df[
~combined_df['repo_path'].str.lower().isin(existing_repo_df['repo_path'].dropna().str.lower())]