In [74]:
import numpy as np
import pandas as pd
In [2]:
#prev
ent = [1,2,3,4,5]
max_std = 10
max_sci = 30
inter_std = ["computers", "plants", "chemicals", "the environment", "rocks", "engineering", "energy", "oceans", "space", "the brain", "matter", "machines", "weather", "the human body", "medicine", "cells", "animals", "something else"]
inter_sci = ["computers", "plants", "chemicals", "the environment", "rocks", "engineering", "energy", "oceans", "space", "the brain", "matter", "machines", "weather", "the human body", "medicine", "cells", "animals"]
day = np.arange(1,32,1)
month = np.array([7,8])
hour = np.arange(8,22,1)
mins = np.arange(0,60,1)
sec = np.arange(0,60,1)
In [65]:
#student data
ent_list = []
inter_list = []
names_list = []
for i1 in range(max_std):
ent_list.append(np.random.choice(ent))
inter_list.append(np.random.choice(inter_std))
names_list.append("student n:" + str(i1))
mock_std = np.array((names_list,ent_list,inter_list)).T
In [68]:
#scientist data
inter_list1 = []
inter_list2 = []
names_list = []
time_stamp_list = []
for i1 in range(max_sci):
time_stamp_list.append("2017-"+str(np.random.choice(month))+ "-" + str(np.random.choice(day))+ " "+ str(np.random.choice(hour))+ ":"+str(np.random.choice(mins))+":"+str(np.random.choice(sec)))
inter1 = np.random.choice(inter_sci)
inter2 = np.random.choice(inter_sci)
inter_list1.append(inter1)
if inter1 == inter2:
inter_list2.append("")
else:
inter_list2.append(inter2)
names_list.append("scientist n:"+str(i1))
mock_sci = np.array((names_list,time_stamp_list,inter_list1,inter_list2)).T
In [71]:
#export
np.savetxt("mock_sci_short.csv",mock_sci,header="Name,time_stamp,field1,field2",delimiter=",",fmt="%s")
np.savetxt("mock_std_short.csv",mock_std,header="Name,enthusiasm,field",delimiter=",",fmt="%s")