a guest May 25th, 2019 69 Never
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)
- 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
RAW Paste Data