Python 笔记

“不积跬步无以至千里,不积小流无以致江海”

在这里我会记录最近使用python编成时的一些代码,为以后作参考(以后也不用太过仔细的找了)

python导入csv数据

  1. 读入数据
    使用pandas将csv文件读入,以Dataframe的格式存在pyhton中。代码如下
import csv
import pandas
filename = r'the direction of csv file'
raw_data = pandas.read_csv(filename) "read out csv file and transfer it into DataFrame type.

 效果

posted @ 2022-04-05 08:10  1223198510  阅读(25)  评论(0)    收藏  举报