comparison PDAUG_Merge_Dataframes/PDAUG_Merge_Dataframes.py @ 0:5bb52d4bf172 draft

"planemo upload for repository https://github.com/jaidevjoshi83/pdaug commit a9bd83f6a1afa6338cb6e4358b63ebff5bed155e"
author jay
date Wed, 28 Oct 2020 01:54:31 +0000
parents
children b5a9f541c6f8
comparison
equal deleted inserted replaced
-1:000000000000 0:5bb52d4bf172
1 import glob
2 import pandas as pd
3 import sys
4
5 files = sys.argv[1]
6 out_file = sys.argv[2]
7
8
9 data_frame = pd.read_csv(files.split(',')[0],sep='\t')
10
11
12 for file in files.split(',')[1:]:
13
14 df1 = pd.read_csv(file,sep='\t')
15 data_frame = pd.concat([data_frame,df1])
16
17 final_DF = data_frame.fillna(0)
18
19 final_DF.to_csv(out_file,sep="\t", index=False)
20
21
22
23
24
25
26
27
28