a
:
Length 10kN
0 0.0 5
1 0.5 5
2 1.0 5
3 1.5 5
4 2.0 5
5 2.5 5
6 3.0 5
7 3.5 5
8 4.0 5
9 4.5 5
10 5.0 5
11 5.0 -5
12 5.5 -5
13 6.0 -5
14 6.5 -5
15 7.0 -5
16 7.5 -5
17 8.0 -5
18 8.5 -5
19 9.0 -5
20 9.5 -5
21 10.0 -5
b
:
Length1 20kN
0 0.0 50
1 0.5 45
2 1.0 40
3 1.5 35
4 2.0 30
5 2.5 25
6 3.0 20
7 3.5 15
8 4.0 10
9 4.5 5
10 5.0 0
11 5.5 -5
12 6.0 -10
13 6.5 -15
14 7.0 -20
15 7.5 -25
16 8.0 -30
17 8.5 -35
18 9.0 -40
19 9.5 -45
20 10.0 -50
c
as a result of my code below:
Length 10kN Length1 20kN Total
0 0.0 5 0.0 50.0 55.0
1 0.5 5 0.5 45.0 50.0
2 1.0 5 1.0 40.0 45.0
3 1.5 5 1.5 35.0 40.0
4 2.0 5 2.0 30.0 35.0
5 2.5 5 2.5 25.0 30.0
6 3.0 5 3.0 20.0 25.0
7 3.5 5 3.5 15.0 20.0
8 4.0 5 4.0 10.0 15.0
9 4.5 5 4.5 5.0 10.0
10 5.0 5 5.0 0.0 5.0
11 5.0 -5 5.5 -5.0 -10.0
12 5.5 -5 6.0 -10.0 -15.0
13 6.0 -5 6.5 -15.0 -20.0
14 6.5 -5 7.0 -20.0 -25.0
15 7.0 -5 7.5 -25.0 -30.0
16 7.5 -5 8.0 -30.0 -35.0
17 8.0 -5 8.5 -35.0 -40.0
18 8.5 -5 9.0 -40.0 -45.0
19 9.0 -5 9.5 -45.0 -50.0
20 9.5 -5 10.0 -50.0 -55.0
21 10.0 -5 NaN NaN NaN
Code I tried:
import pandas as pd
a=pd.read_csv("first.csv")
b=pd.read_csv("second.csv")
c=pd.concat([a,b], axis=1)
c['Total']=c['10kN']+c['20kN']
print(c['Total'])
print(a)
print(b)
print(c)
I want add two column 10kN and 20kN for same length