我首先用逗号分割了每台笔记本电脑的描述(使用str.split),然后我想从那里创建内容,但出现一个错误,提示“无法将大小为14的数组重塑为形状(14,10)”尝试了很多方法,但是什么也没有。
拆分后,我尝试使用pd.Dataframe,但它给我的错误是无法将大小为14的数组重塑为形状(14,10)。 我不知道如何解决这个问题
desc1 =
"1UG81UAR#ABL - Intel Core i7-7700HQ 2.80GHz, 8GB, 2TB,
15.6""FHD(1920x1080), AMD Radeon RX550 2GB, 802.11ac+BT, Cam+Mic,
Win 10, Refurb 90-Days"
"3NS58AAR#ABA-WH2L - Intel Core i7-8750H 2.20GHz, 8GB, 1TB+16GB
Optane SSD, 15.6""FHD(1920x1080), NVIDIA GeForce 4GB, 802.11ac+BT,
Cam+Mic, Win 10, Factory Refurb 90-Days"
"3NS58AAR#ABA-WH39 - Intel Core i7-8750H 2.20GHz, 8GB, 1TB+16GB
Optane SSD, 15.6""FHD(1920x1080), NVIDIA GeForce 2GB, 802.11ac+BT,
Cam+Mic, Win 10, Factory Refurb 90-Days"
"D3L06LAT#ABM - AMD E1-1500 1.48GHz, 2GB, 500GB, 14""HD(1366x768),
Radeon HD 7310, DVDRW, 802.11bgn, Cam+Mic, Win 8.0Pro, Refurb 90-
Days"
"2XH17AAR#ABA-WH1P - AMD A9-9420 3.00GHz, 4GB, 128GB SSD,
15.6""HD(1366x768), Radeon R5, 802.11ac+BT, Cam+Mic, Silk Gold, Win
10, Factory Refurb 90-Days"
"4NC74UAR#ABA - AMD Ryzen 5-2500U 2.00GHz, 8GB,128GB SSD,
15.6""HD(1366x768), Radeon Vega 8, 802.11ac+BT, Cam+Mic, Win 10,
Factory Refurb 90-Days"
"P0E23LAT#ABM - AMD A10-8700P 1.80GHz, 16GB, 1TB,
15.6""HD(1366x768), Radeon R7 M360 2GB, DVDRW, 802.11ac+BT, Cam+Mic,
Win 10, Refurb 90-Days"
"2NM72UAT#ABA - AMD A6-9220 2.50GHz, 4GB, 500GB, 15.6""HD(1366x768),
Radeon R4, 802.11bgn, Cam+Mic, Win 10, Refurb 90-Days"
"4JB82UAR#ABA - AMD A9-9425 3.10GHz, 4GB, 1TB, 15.6""HD(1366x768),
Radeon R5, DVDRW, 802.11bgn+BT, Cam+Mic, Win 10, Factory Refurb 90-
Days"
"2DX36AAR#ABA-WKHN - Intel Core i7-7500U 2.70GHz, 12GB, 128GB SSD,
15.6""HD(1366x768) Touchscreen, Intel HD, 802.11ac+BT, Cam+Mic, Jet
Black, Win 10, Factory Refurb 90-Days"
"2DX36AAR#ABA-WLTX - Intel Core i7-7500U 2.70GHz, 8GB, 128GB SSD,
15.6""HD(1366x768) Touchscreen, Intel HD, 802.11ac+BT, Cam+Mic, Jet
Black, Win 10, Factory Refurb 90-Days"
"2DX36AAR#ABA-WLN6 - Intel Core i7-7500U 2.70GHz, 8GB, 128GB SSD,
15.6""HD(1366x768) Touchscreen, Intel HD, 802.11ac+BT, Cam+Mic, Jet
Black, Win 10, Factory Refurb 90-Days"
"W7B99UAT#ABL - AMD A8-7410 2.20GHz, 8GB, 1TB, 15.6""HD(1366x768)
Touchscreen, Radeon R5, 802.11bgn, Cam+Mic, Win 10, Refurb 90-Days"
"3WE70UAR#ABA - AMD Ryzen 5-2500U 2.00GHz, 8GB,1TB,
15.6""HD(1366x768) Touchscreen, Radeon Vega 8, 802.11ac+BT, Cam+Mic,
Win 10, Factory Refurb 90-Days"
dataframe =
Model Proc MEM HD size Vid GH Mic...
0 1UG81UAR#ABL Intel Core 8GB 2TB 15.6... AMD... 802...
1 3NS58AAR#ABA Intel Core 8GB 1TB..15.6.. NVIDIA..
i7...
我试图拆分然后创建一个数据框,所以我可以根据规格进行一些线性回归。 我将不胜感激