Question: In Python, I want a covariance matrix of this data. The data matrix is 16x5 so the covariance matrix should be 5x5. I imported an
In Python, I want a covariance matrix of this data. The data matrix is 16x5 so the covariance matrix should be 5x5. I imported an csv file from excel(if that make a difference)
I want tried np.cov(data) and a host of different things. In particular, np.cov(data, 5, rowvar=False) gives me this error: ValueError: all the input array dimensions except for the concatenation axis must match exactly.

In [4]: Out[4]: 1 data LA Hours 3387 3109 2670 3125 3469 3120 3671 4531 3678 3135 3135 5217 3728 3506 3824 3516 EE Hours 2200 875 957 1758 868 398 1603 523 2034 1136 5326 1658 1945 344 807 1223 Holdover Hours COA Hours 14861 11367 13329 12328 12847 13979 13528 12699 13534 11609 14189 15052 12236 15482 14900 15078 1181 3532 2502 4510 3032 2130 1982 4675 2354 4606 3044 3340 2111 1291 1365 1175 Meeting Hours 236 310 1182 1208 1385 1053 1046 1100 1349 1150 1216 660 299 206 239 161 2 4 10 12 13 15 In [4]: Out[4]: 1 data LA Hours 3387 3109 2670 3125 3469 3120 3671 4531 3678 3135 3135 5217 3728 3506 3824 3516 EE Hours 2200 875 957 1758 868 398 1603 523 2034 1136 5326 1658 1945 344 807 1223 Holdover Hours COA Hours 14861 11367 13329 12328 12847 13979 13528 12699 13534 11609 14189 15052 12236 15482 14900 15078 1181 3532 2502 4510 3032 2130 1982 4675 2354 4606 3044 3340 2111 1291 1365 1175 Meeting Hours 236 310 1182 1208 1385 1053 1046 1100 1349 1150 1216 660 299 206 239 161 2 4 10 12 13 15
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
