我刚刚开始接触 pandas(这很棒),我需要做的是将压缩的基因组学类型文件从 ftp 站点读入 pandas 数据帧。这是我尝试过的,但遇到了很多错误:
from pandas.io.parsers import *
chr1 = 'ftp://ftp.ncbi.nih.gov/snp/organisms/human_9606/chr_rpts/chr_1.txt.gz'
CHR1 = read_csv(chr1, sep='\t', compression = 'gzip', skiprows = 10)
print type(CHR1)
print CHR1.head(10)
理想情况下,我想做这样的事情:
from pandas.io.data import *
AAPL = DataReader('AAPL', 'yahoo', start = '01/01/2006')