I imported 2 file texts and I want to sum and append the results of both files like this
import pandas as pd
import numpy as np
X = pd.read_csv('C:\\Users\\ahmed\\Desktop\\line format.txt', sep="\t", header=None)
X2 = pd.read_csv('C:\\Users\\ahmed\\Desktop\\line format2.txt', sep="\t", header=None)
print('X is : ',X)
print('X2 is : ',X2)
Results are like this :
X is : 0
0 1 2 3
1 4 5 6
X2 is : 0
0 7 8 9
1 10 11 12
2 13 14 15
what I want to do is to append like this
1 2 3
4 5 6
7 8 9
10 11 12
13 14 15
and to sum like this
8 10 12
14 16 18
Any help would be appreciated. thank you