最好先用withopen 再转换成dataframe
datafile = './work/housing.data'
data = np.fromfile(datafile, sep=' ')

本文介绍了一种使用numpy库中的fromfile方法从文件中读取数据的有效方式,并建议在处理数据前先使用with open打开文件,再转换为dataframe格式,以便于后续的数据分析和处理。
最好先用withopen 再转换成dataframe
datafile = './work/housing.data'
data = np.fromfile(datafile, sep=' ')


被折叠的 条评论
为什么被折叠?