pandas reading csv orientation

前端 未结 2 2109
谎友^
谎友^ 2021-02-15 04:47

Hei I\'m trying to read in pandas the csv file you can download from here (euribor rates I think you can imagine the reason I would like to have this file!). The file is a CSV f

2条回答
  •  我寻月下人不归
    2021-02-15 05:07

    I've never used pandas for csv processing. I just use the standard Python lib csv functions as these use iterators.

    import csv
    myCSVfile=r"c:/Documents and Settings/Jason/Desktop/hist_EURIBOR_2012.csv"
    f=open(myCSVfile,"r")
    reader=csv.reader(f,delimiter=',')
    data=[]
    for l in reader:
        if l[0].strip()=="3m":
            data.append(l)
    
    f.close()
    

提交回复
热议问题