I am struggling to simply append the following tables into one:
chr pos gene
1 100 A
2 150 B
chr pos gene
1 100 A
2 150 F
4 800 D
I would like the final table to look like:
chr pos gene chr pos gene
1 100 A 1 100 A
2 150 B 2 150 F
4 800 D
The tables have same number of columns, but different number of rows. NaN or 0 can be used to fill those empty spots if needed. This is just for us to better visually compare a few table files at once. Nothing fancy needed.
I have tried to use pandas following methods from: https://pandas.pydata.org/pandas-docs/stable/merging.html but the methods here would combine rows with same index - which I do not need. I also tried to just use csv.reader (How two merge several .csv files horizontally with python?), but my output was empty without error message... Not sure if it is because the number of rows were different.
Any advice would be appreciated. Thank you.