---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\managers.py in create_block_manager_from_arrays(arrays, names, axes)
1670 blocks = form_blocks(arrays, names, axes)
-> 1671 mgr = BlockManager(blocks, axes)
1672 mgr._consolidate_inplace()
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\managers.py in __init__(self, blocks, axes, do_integrity_check)
138 if do_integrity_check:
--> 139 self._verify_integrity()
140
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\managers.py in _verify_integrity(self)
333 if block._verify_integrity and block.shape[1:] != mgr_shape[1:]:
--> 334 construction_error(tot_items, block.shape[1:], self.axes)
335 if len(self.items) != tot_items:
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\managers.py in construction_error(tot_items, block_shape, axes, e)
1693 raise ValueError("Empty data passed with indices specified.")
-> 1694 raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")
1695
ValueError: Shape of passed values is (1, 3), indices imply (6, 3)
During handling of the above exception, another exception occurred:
ValueError Traceback (most recent call last)
<ipython-input-50-71c4249f1be0> in <module>
2 y_predict = simpleLinearRegression.predict(x_test)
3
----> 4 predict = pd.DataFrame({'X Test': x_test, 'Y Predict': y_predict, 'Y real': y_test})
5 predict.head(10)
6
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\frame.py in __init__(self, data, index, columns, dtype, copy)
433 )
434 elif isinstance(data, dict):
--> 435 mgr = init_dict(data, index, columns, dtype=dtype)
436 elif isinstance(data, ma.MaskedArray):
437 import numpy.ma.mrecords as mrecords
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\construction.py in init_dict(data, index, columns, dtype)
252 arr if not is_datetime64tz_dtype(arr) else arr.copy() for arr in arrays
253 ]
--> 254 return arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
255
256
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\construction.py in arrays_to_mgr(arrays, arr_names, index, columns, dtype)
72 axes = [ensure_index(columns), index]
73
---> 74 return create_block_manager_from_arrays(arrays, arr_names, axes)
75
76
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\managers.py in create_block_manager_from_arrays(arrays, names, axes)
1673 return mgr
1674 except ValueError as e:
-> 1675 construction_error(len(arrays), arrays[0].shape, axes, e)
1676
1677
D:\CourseMSSR\git\course-social-robotics\machine_learning_jupyter\venv\lib\site-packages\pandas\core\internals\managers.py in construction_error(tot_items, block_shape, axes, e)
1692 if block_shape[0] == 0:
1693 raise ValueError("Empty data passed with indices specified.")
-> 1694 raise ValueError(f"Shape of passed values is {passed}, indices imply {implied}")
1695
1696
ValueError: Shape of passed values is (1, 3), indices imply (6, 3)