Skip to content

Instantly share code, notes, and snippets.

@Lxbinary
Last active November 28, 2018 20:26
Show Gist options
  • Save Lxbinary/7ee3ad17e25e6910d180a03e706d6d66 to your computer and use it in GitHub Desktop.
Save Lxbinary/7ee3ad17e25e6910d180a03e706d6d66 to your computer and use it in GitHub Desktop.
data_f
News_Time_Unix_ls = np.array(data_news.News_Time_Unix)
Data_Unix_ls = np.array(data.time_unix)
time_p600_ls = np.array(data_news.News_Time_Unix + 600)
time_m600_ls = np.array(data_news.News_Time_Unix - 600)
news = np.zeros(len(Data_Unix_ls), dtype=int)
for i in tnrange(len(Data_Unix_ls),desc='Data_Unix_ls'):
for t in range(len(News_Time_Unix_ls)):
if (time_p600_ls[t]) < Data_Unix_ls[i] > (time_m600_ls[t]):
news[i]=1
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment