As we all know,we use numpy to do some data explore.CSV has a good point to get a lot data. so how can we get a data from CSV by numpy. NO.1 you can use file to open it. 这里的csv文件为泰坦尼克号的文件(此处是对于维度小于等于2) import csv filename = 'C:\Users\dzy520\Desktop\t
这回咱们用个pandas库 1.首先先看将列表存储到csv: 代码来自于:https://blog.csdn.net/weixin_43245453/article/details/90054820 import pandas as pd #a和b的长度必须保持一致,否则报错 a = [x for x in range(5)] print(a) b = [x for x in range(5,10)] #字典中的key值即为csv中列名 dataframe = pd.DataFrame({'a_