

# 如果 dalao数目比较多还无法根据earnper为负进行筛选 使用此方法去除 earn_per 为负比例较高的 dalao

from base_class import BaseVariableFunction
from base_class import *
baseclass = BaseVariableFunction(__file__)


baseclass.makedirpath(baseclass.new_dalao_ana_fm_path)

baseclass.open_base_library()
decimal.getcontext().prec = 100
old_print = print


def timestamped_print(*args, **kwargs):
    old_print(datetime.datetime.utcnow().replace(
        microsecond=0), *args, **kwargs)


print = timestamped_print
print('\n'*5)
print(f"{'{:<6}'.format('ENTER')} {baseclass.scriptfilename} ----------------NOTE-----------NOTE---------------")

 
 
totalana_df = pd.read_excel(baseclass.dalao_total_ana_fm_path/f"totalana.xlsx",dtype=object)

totalana_anaing_dalao_df = pd.read_excel(baseclass.dalao_total_ana_fm_path/f"totalana_anaing_dalao.xlsx",dtype=object)
arr_add_totalana_anaing_dalao =totalana_anaing_dalao_df["add"].tolist()
totalana_someadd_df = totalana_df[totalana_df["add"].isin(arr_add_totalana_anaing_dalao)]
 
totalana_someadd_df.to_excel(baseclass.dalao_total_ana_fm_path/"totalana_someadd.xlsx",index=False)

print(f"{'{:<6}'.format('END')} {baseclass.scriptfilename} ----------------NOTE-----------NOTE---------------")
