我有交易和客户实体,并且我的label和cutoff_time列位于我的目标实体是客户的交易实体中。客户与交易实体有关系。如何从客户实体中指定我的截止时间?
我创建了一个数据框,其中'customer_id'指向客户表,时间和标签指向交易表。
cutoff_times = pd.DataFrame()
cutoff_times['customer_id'] = es['customers'].df['customerno']
cutoff_times['time'] = es['transactions'].df['date']
cutoff_times['label'] = es['transactions'].df['action']