when i try to create dataframe from two columns i.e. pids and SalePrice I get error "Exception: Data must be 1-dimensional". I think the error is coming because these two data series are in different format like below. Please help how can i make these data series same
ksubmission = pd.DataFrame({'Id':pids,'SalePrice':predictions_kaggle})
Exception: Data must be 1-dimensional
pids.shape
(1459,)
predictions_kaggle.shape
(1459, 1)
predictions_kaggle is in below format
array([[115901.20520943],
[144313.70246636],
[165320.94012928],
...,
[155759.14767572],
[111175.64223766],
[249104.99042467]])
while pids is in below format
0 1461
1 1462
2 1463
3 1464
4 1465
...
1454 2915
1455 2916
1456 2917
1457 2918
1458 2919
Name: Id, Length: 1459, dtype: int64
pids.valuesinstead ofpids?predictions_kaggle.flatten()to make it 1-dimensional?