import numpy as np
import pandas as pd
img1 = np.random.randn(28*28).reshape(28,28)
img2 = np.random.randn(28*28).reshape(28,28)
img3 = np.random.randn(28*28).reshape(28,28)
img4 = np.random.randn(28*28).reshape(28,28)
img5 = np.random.randn(28*28).reshape(28,28)
_a = [1]*5+[2]*5+[3]*5+[4]*5+[5]*5
_b = [1,2,3,4,5]*5

- 2번째 데이터

df=pd.DataFrame({'t':_a ,'s':_b})
df 
t s
0 1 1
1 1 2
2 1 3
3 1 4
4 1 5
5 2 1
6 2 2
7 2 3
8 2 4
9 2 5
10 3 1
11 3 2
12 3 3
13 3 4
14 3 5
15 4 1
16 4 2
17 4 3
18 4 4
19 4 5
20 5 1
21 5 2
22 5 3
23 5 4
24 5 5

- 3번째 데이터

df=df.assign(third = [0]*25)
df
t s third
0 1 1 0
1 1 2 0
2 1 3 0
3 1 4 0
4 1 5 0
5 2 1 0
6 2 2 0
7 2 3 0
8 2 4 0
9 2 5 0
10 3 1 0
11 3 2 0
12 3 3 0
13 3 4 0
14 3 5 0
15 4 1 0
16 4 2 0
17 4 3 0
18 4 4 0
19 4 5 0
20 5 1 0
21 5 2 0
22 5 3 0
23 5 4 0
24 5 5 0
df.third[0] = np.exp(((img1-img1)**2).sum())
theta= 5000
df.third[1] = np.exp(-((img1-img2)**2/theta).sum())
df
t s third
0 1 1 1
1 1 2 0
2 1 3 0
3 1 4 0
4 1 5 0
5 2 1 0
6 2 2 0
7 2 3 0
8 2 4 0
9 2 5 0
10 3 1 0
11 3 2 0
12 3 3 0
13 3 4 0
14 3 5 0
15 4 1 0
16 4 2 0
17 4 3 0
18 4 4 0
19 4 5 0
20 5 1 0
21 5 2 0
22 5 3 0
23 5 4 0
24 5 5 0