我正在尝试将一个数据集从UCI导入到pandas数据帧中,但我得到的只是一个html输出。有人能帮我吗?下面是我的代码:
pd.read_csv('names = ['Frequency','Angle of attack','Chord length','Free-stream velocity','Suction/side','Scaled/sound']
af = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/00291/',sep=',',names=names)')发布于 2019-12-28 10:36:13
这将加载它,我测试了它:
pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/00291/airfoil_self_noise.dat', sep="\t", names = ['Frequency','Angle of attack','Chord length','Free-stream velocity','Suction/side','Scaled/sound'])
Frequency Angle of attack Chord length Free-stream velocity Suction/side Scaled/sound
0 800 0.0 0.3048 71.3 0.002663 126.201
1 1000 0.0 0.3048 71.3 0.002663 125.201
2 1250 0.0 0.3048 71.3 0.002663 125.951
3 1600 0.0 0.3048 71.3 0.002663 127.591
4 2000 0.0 0.3048 71.3 0.002663 127.461
... ... ... ... ... ... ...
1498 2500 15.6 0.1016 39.6 0.052849 110.264
1499 3150 15.6 0.1016 39.6 0.052849 109.254
1500 4000 15.6 0.1016 39.6 0.052849 106.604
1501 5000 15.6 0.1016 39.6 0.052849 106.224
1502 6300 15.6 0.1016 39.6 0.052849 104.204
[1503 rows x 6 columns]https://stackoverflow.com/questions/59507399
复制相似问题