Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python dynamic csvnfile joining

import os
import pandas as pd

df = pd.concat(
    [pd.read_csv(f, sep="	") for f in os.listdir() if f.endswith(".csv") and f.startswith("sample")], 
    ignore_index=True
)

df = df.pivot_table(index="ProbeID", columns="p_code", values="intensities", aggfunc="sum")
print(df)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #dynamic #csvnfile #joining
ADD COMMENT
Topic
Name
7+1 =