Kaggle competition: Predicting Molecular Properties
problem = train[train.sessionId.map(train.sessionId.value_counts() == 2)].sort_values(["sessionId", 'visitStartTime'])
 problem.head(10 )<data_type_conversions>
test = pd.read_csv('.. /input/champs-scalar-coupling/test.csv')
 sub1 = pd.read_csv('.. /input/keras-neural-net-and-distance-features/submission.csv')
 sub2 = pd.read_csv('.. /input/keras-nn-with-multi-output/submission.csv')
 display(test.head() ,sub1.head() ,sub2.head() )
train.loc[pd.to_datetime(train.visitStartTime, unit='s')== "2017-04-25 18:49:35"].head(8 )<count_values>
sub = pd.DataFrame(columns = ['id','scalar_coupling_constant'])
 mol_types1 = ['2JHH','2JHN','2JHC','3JHH', '3JHC', '3JHN']
mol_types2 = ['1JHC', '1JHN']
print("Train: ", np.bincount(train.visitId.value_counts()))<count_values>
for mol_type in mol_types1:
index = test[test['type']==mol_type].id
temp= sub1[sub1['id'].isin(index)]
sub = pd.concat([sub, temp])
 for mol_type in mol_types2:
index = test[test['type']==mol_type].id
temp= sub2[sub2['id'].isin(index)]
sub = pd.concat([sub, temp])
print("test: ", np.bincount(test.visitId.value_counts()))<data_type_conversions>
sub.sort_values(['id'], inplace = True)
 sub.head()
<sort_values><EOS> 
sub.to_csv("/kaggle/working/submission.csv", index=False )