Read .sample file (file format available in plink) as a dataframe in pandas
1
1
Entering edit mode
4.8 years ago
datainterns ▴ 10

I have a .sample file that I need to load in a dataframe in pandas (in python) for some further computation.Can somebody suggest any appropriate method...The format of my file is as follows:-

ID POP  GROU    P SE    X
HG00096 GBR EUR male
HG00097 GBR EUR female
HG00099 GBR EUR female
HG00100 GBR EUR female
HG00101 GBR EUR male
HG00102 GBR EUR female
........
........
imputation plink pandas • 1.3k views
ADD COMMENT
0
Entering edit mode
4.8 years ago
bari.ballew ▴ 460

If it's just a tabular text file, then use read_csv , e.g.

import pandas as pd
df = pd.read_csv('.sample', sep='\t')
ADD COMMENT

Login before adding your answer.

Traffic: 1998 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6