Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import glob
- import os
- path = 'Downloads/cistrome_hg38/hg38_cismotifs/'
- filelist = glob.glob(path + "/*")
- print (filelist[1])
- frame = pd.DataFrame()
- for file in filelist:
- df2 = pd.read_csv(file,sep='\t')
- df2.columns = ['chr','start','end','score']
- factorname = os.path.basename(file)
- df2['factor'] = factorname
- frame=frame.append(df2,ignore_index=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement