Here is my code:
Depth['timing']=np.where((Depth['time_entry']== 'later' )| (Depth['offer_status']=='market'), Depth['time_status_change'],Depth['time_entry'])
Depth2['timing']=np.where((Depth2['time_entry']== 'later' ) | (Depth2['offer_status']=='market'), Depth2['time_status_change'],Depth2['time_entry'])
Update: I solved it anyways, but used some stupid loop which is not very good for performance.
What I got is: invalid type comparison
. What can I do to fix it? Depth['time_entry']
is a column with either a number
or 'later'
, so maybe that is the issue?