python - Broadcasting error when counting occurance of data in multiple column -




i using pandas calculating occurrence of data on particular row in column. data use pressure values need find if acutal observation data (d3) appearing on other rows of colums. here data use:-

date         aa1      bb1    cc1     aa2     bb2     cc2     aa3     bb3     cc3 01/06/2016  1008    1007.5  1008    1008.4  1006.8  1008    1008.4  1007.4  1008 02/06/2016  1007.8  1007.4  1008.8  1007.8  1006.8  1008.8  1007.6  1007    1008.8 03/06/2016  1007.8  1006.4  1008.2  1007.8  1006.4  1008.2  1006.8  1007    1008.2 04/06/2016  1007.4  1006.5  1007    1007.8  1006.4  1007    1007.6  1006.4  1007 05/06/2016  1008    1006.2  1007.3  1007    1006.8  1007.3  1007.6  1006.4  1007.3 06/06/2016  1007.8  1006.8  1007.9  1007.6  1006.8  1007.9  1007.2  1007    1007.9 07/06/2016  1007.4  1007.4  1007.3  1008    1006.4  1007.3  1007.8  1006.8  1007.3 08/06/2016  1006.4  1005.8  1007    1006.8  1006.4  1007    1007.8  1007    1007 09/06/2016  1007.6  1006    1007.4  1007.4  1005.4  1007.4  1007.6  1007    1007.4 10/06/2016  1008.2  1006.6  1008.3  1008.4  1006.4  1008.3  1008.4  1007.4  1008.3 11/06/2016  1009.2  1007.8  1009    1009    1006.8  1009    1009    1008.2  1009 12/06/2016  1009    1007.4  1010    1009.6  1008.2  1010    1008.5  1007.2  1010 13/06/2016  1010    1009    1009    1009.4  1008.4  1009    1009    1008    1009 14/06/2016  1010.4  1009    1010    1011    1008.9  1010    1009.8  1007.2  1010 15/06/2016  1009.4  1009.2  1009    1009.1  1008.8  1009    1009.9  1008    1009 16/06/2016  1008.8  1007    1007.8  1008.2  1007.2  1007.8  1009    1007    1007.8 17/06/2016  1007    1006    1006.7  1007    1006    1006.7  1007.4  1006.2  1006.7 18/06/2016  1006.5  1005.2  1005.5  1006    1006    1005.5  1006    1006.5  1005.5 19/06/2016  1006.8  1006    1006.4  1007    1005.2  1006.4  1006    1005    1006.4 20/06/2016  1006    1006    1005.2  1005.9  1005.2  1005.2  1007    1004.6  1005.2 21/06/2016  1006.8  1006    1005.4  1006    1004.8  1005.4  1005.2  1005    1005.4 22/06/2016  1006.8  1005.8  1006.7  1008.8  1008    1006.7  1005.8  1006.6  1006.7 23/06/2016  1008    1007.6  1008.7  1009    1007.5  1008.7  1007.2  1008    1008.7 24/06/2016  1006    1005    1008    1007.8  1007    1008    1007.2  1007.6  1008 25/06/2016  1007    1005.8  1008.4  1007    1006    1008.4  1006.8  1007.2  1008.4 26/06/2016  1008    1008    1008.6  1008    1006.8  1008.6  1006    1006    1008.6 27/06/2016  1007.8  1006.4  1008    1006    1006    1008    1007.8  1006.6  1008 28/06/2016  1007.8  1006    1006.4  1006.4  1006.6  1006.4  1007    1007    1006.4 29/06/2016  1006    1008    1007.8  1008    1006.8  1007.8  1008    1007.2  1007.8 30/06/2016  1008    1008    1008.4  1008.2  1008    1008.4  1007.8  1007.8  1008.4 01/07/2016  1008    1007.4  1007.4  1008    1007.5  1007.4  1008    1008    1007.4 02/07/2016  1007    1006.5  1007.8  1007.9  1006.9  1007.8  1007    1006.5  1007.8 03/07/2016  1007.4  1007.2  1007.8  1008    1007    1007.8  1008    1007.5  1007.8 04/07/2016  1008.2  1007.8  1007.9  1008.4  1007.4  1007.9  1008.2  1008    1007.9 05/07/2016  1008    1008    1009.1  1009    1008.2  1009.1  1008.8  1008.6  1009.1 06/07/2016  1008    1008.2  1008.5  1008    1007.5  1008.5  1008.8  1008.5  1008.5 07/07/2016  1007.8  1007.5  1008.3  1008.2  1007.8  1008.3  1008.5  1007.5  1008.3 08/07/2016  1007.5  1008.5  1007.8  1007.9  1007.5  1007.8  1008.5  1008    1007.8 09/07/2016  1008        1008.4  1008    1007.5  1008.4  1008.2  1007.4  1008.4 10/07/2016  1007.8  1008    1008.1  1008        1008.1  1008.5  1007.8  1008.1 11/07/2016  1008.2  1007.6  1008.2  1008.4  1007.8  1008.2  1008.8      1008.2 12/07/2016  1008    1006.6  1008.4  1008    1006.5  1008.4  1008.5  1006.4  1008.4 13/07/2016  1008.2  1007.2  1009.1  1008.4  1006.8  1009.1  1008.8  1007    1009.1 14/07/2016  1007.4  1006.8  1008.6  1007.2  1006.8  1008.6  1007.8  1006.2  1008.6 15/07/2016  1006.4  1006.9  1007.2  1006.8  1007    1007.2  1006    1006.9  1007.2 16/07/2016  1006.4  1006.8  1007    1006    1007    1007    1006    1007    1007 17/07/2016  1007.8  1007.4  1008.2  1007.7  1007.6  1008.2  1007.6  1007.8  1008.2 18/07/2016  1010    1009    1009.8  1010    1009.2  1009.8  1010    1009.8  1009.8 19/07/2016  1010    1009    1010.4  1010    1009.6  1010.4  1010.2  1010.2  1010.4 20/07/2016  1008    1009.5  1009.7  1009.2  1009    1009.7  1009.8  1009.2  1009.7 21/07/2016  1008    1007    1008.6  1008    1007.5  1008.6  1008    1007.4  1008.6 22/07/2016  1008    1006.8  1008.3  1007.8  1006.2  1008.3  1007.8  1008    1008.3 23/07/2016  1006.7  1006.5  1007.7  1008    1006.2  1007.7  1007.4  1006.2  1007.7 24/07/2016          1007.4  1007    1006.5  1007.4  1007.2  1005.2  1007.4 25/07/2016  1006.4  1006.7  1007.6          1007.6  1006    1006.5  1007.6 26/07/2016  1006.6  1006.5  1006.6  1005.8  1006.5  1006.6          1006.6 27/07/2016  1006.4  1007.2  1006.9  1006.4  1006.2  1006.9  1005.6  1006.5  1006.9 28/07/2016  1005.9  1006    1007.6  1006    1006    1007.6  1006.2  1006.5  1007.6 29/07/2016  1007    1007    1007.4  1007    1006.9  1007.4  1006.8  1007    1007.4 30/07/2016  1007    1007    1007.3  1007    1007.2  1007.3  1007    1006    1007.3 31/07/2016  1009    1008.5  1008.6      1007.2  1008.6  1008.6  1008.6  1008.6 01/08/2016  1009.2  1010    1009.6  1009.5  1009    1009.6  1009    1008.2  1009.6 02/08/2016  1008.4  1009    1009.9  1009.7  1009    1009.9  1009    1008.2  1009.9 03/08/2016  1006.6  1006.8  1007.4  1007.2  1006.8  1007.4  1008    1006    1007.4 04/08/2016  1007    1006    1007.1  1006.6  1006.4  1007.1  1006.8  1005.9  1007.1 05/08/2016  1008    1007    1008.2  1007.8  1007    1008.2  1008    1007.4  1008.2 06/08/2016  1007    1008.2  1009.2  1009.6  1007.6  1009.2  1008    1008    1009.2 07/08/2016  1007    1008.2  1008.7  1008.4  1008    1008.7  1008    1008    1008.7 08/08/2016  1007    1008.6  1009.6  1008.4  1008    1009.6  1009.2  1008.2  1009.6 09/08/2016  1009.6  1008.8  1009.8  1008.4  1008.2  1009.8  1009.2  1008.2  1009.8 10/08/2016          1009.6  1008.8  1008.6  1009.6  1009    1008    1009.6 11/08/2016  1009    1009.4  1009.7          1009.7  1009.8  1009    1009.7 12/08/2016  1010.4  1010    1011    1010.2  1009.8  1011            1011 13/08/2016  1010.2  1009.8  1010.2  1010    1009.2  1010.2  1010    1009.4  1010.2 14/08/2016  1009.2  1007.4  1009.5  1009    1007.6  1009.5  1009.4  1007.6  1009.5 15/08/2016  1009    1008    1009.3  1009.2  1008.4  1009.3  1009.2  1008.8  1009.3 16/08/2016  1008.6  1007.8  1009.1  1009    1007.5  1009.1  1009    1007.8  1009.1 17/08/2016  1007.8      1008.2  1008    1007.3  1008.2  1008    1007.2  1008.2 18/08/2016  1007.5      1007.4  1007.2      1007.4  1007.6  1007.1  1007.4 19/08/2016  1007    1007    1007.4  1006.6      1007.4  1006.8      1007.4 20/08/2016  1007    1006.5  1007.6  1007.4  1006.5  1007.6  1006.5      1007.6 21/08/2016  1007    1006.5  1007.3  1006.8  1006.4  1007.3  1006.8  1006.4  1007.3 22/08/2016  1007.5  1007    1008.2  1006.8  1006.4  1008.2  1006.5  1006.8  1008.2 23/08/2016  1008.5  1009    1008.7  1006.6  1006.5  1008.7  1006.5  1006.8  1008.7 24/08/2016  1007.8  1008.8  1008.7  1008    1007.8  1008.7  1006.5  1006.4  1008.7 25/08/2016  1007    1007    1008    1007.8  1007.4  1008    1007.6  1007.2  1008 26/08/2016  1007.8  1007.8  1008.1  1006.8  1006.5  1008.1  1008    1007    1008.1 27/08/2016  1007.8  1007.8  1008.1  1007.4  1007    1008.1  1006.5  1006.4  1008.1 28/08/2016  1008.2  1008.8  1009    1008    1007.9  1009    1007.6  1007.9  1009 29/08/2016  1008.2  1008.2  1008.6  1008    1008    1008.6  1008    1008.2  1008.6 30/08/2016  1008.2  1008.8  1008.2  1006.4  1006.2  1008.2  1007.8  1007.2  1008.2 31/08/2016  1005.8  1007.4  1006.6  1008    1008    1006.6  1006.4  1007    1006.6 01/09/2016  1008    1008    1010.8  1008    1007.8  1010.8  1007.8  1007.2  1010.8 02/09/2016  1005.8  1007.4  1010    1008.5  1009    1010    1009    1009.2  1010 03/09/2016  1008    1008    1010    1008    1007.8  1010    1008.5  1009.2  1010 04/09/2016          1009    1008.5  1009    1009    1009    1009.2  1009 05/09/2016  1010    1011.5  1011.5          1011.5  1008.5  1009.2  1011.5 06/09/2016  1011    1011    1010    1011    1011.5  1010            1010 07/09/2016  1008    1008        1011    1011        1011.5  1011     08/09/2016  1010.5  1010.5  1010.2  1008.5  1009    1010.2  1010    1009.9  1010.2 09/09/2016  1009.5  1009.8  1010.2  1009.8  1010    1010.2  1008.5  1009.2  1010.2 10/09/2016  1009.2  1009.2  1009.8  1009.2  1009.8  1009.8  1009    1009    1009.8 11/09/2016  1009.5  1009.8  1009.5  1008.6  1008.5  1009.5  1008    1008.5  1009.5 12/09/2016  1009.5  1009.8  1008.4  1009.2  1009.8  1008.4  1007.6  1007    1008.4 13/09/2016  1009.2  1009.2  1008.4  1009    1009.8  1008.4  1008    1008.5  1008.4 14/09/2016  1008.5  1008    1008    1008.6  1008.5  1008    1008    1008    1008 15/09/2016  1008    1008    1008.3  1008    1007    1008.3  1007.6  1007    1008.3 16/09/2016  1006    1007    1008.3  1008    1007    1008.3  1008    1007.5  1008.3 17/09/2016  1008.7  1008    1008.7  1008.6  1008    1008.7  1009    1008    1008.7 18/09/2016  1008.4  1008    1008.8  1008.6  1008    1008.8  100.9.0 1008.4  1008.8 19/09/2016  1006    1007    1008    1009    1008    1008    1010    1009    1008 20/09/2016  1009    1008    1009.5  1008.6  1008    1009.5  1007.8  1009    1009.5 21/09/2016  1007.8  1007.4  1009.5  1008    1007    1009.5  100.9.0 1008.4  1009.5 22/09/2016  1009    1008    1009    1008.4  1008.2  1009    1008.8  1008    1009 23/09/2016  1008.8  1007.8  1009.1  1008    1007    1009.1  1008    1008    1009.1 24/09/2016  1007    1006.4  1007.7  1007    1006    1007.7  1008.8  1008    1007.7 25/09/2016  1006    1006    1006.8  1005.8  1005.6  1006.8  1005.8  1004.6  1006.8 26/09/2016  1007    1005.6  1007    1006    1006    1007    1006.2  1005.4  1007 27/09/2016  1006    1006    1008    1008    1007.2  1008    1007    1007    1008 28/09/2016  1008    1007.6  1008.9  1006    1006    1008.9  1008    1007.4  1008.9 29/09/2016  1007.2  1007    1008.9  1006.8  1007    1008.9  1007    1007    1008.9 30/09/2016  1008    1007.6  1007.5  1006.5  1006.5  1007.5  1006.6  1006    1007.5 

i using this particular code counting occurrence (if last column data within + or - 1):-

df = pd.read_csv(data_path, index_col=0, parse_dates=true, dayfirst=true) occu_1 = (df[['aa3', 'bb3']].sub(df['cc3'], axis=0).abs() < 1).all(1).sum() 

the issue facing pandas result in following value error:-

valueerror: operands not broadcast shapes (244,) (122,) 

what puzzles me have exact row , column other parameter not produce errors. can 1 me in right direction.

found issue. there value 100.9.0 in 1 of column have extracted calculation. believe error message seems point else. similarly, had data set t there in between data set , produced same valueerror. strange debug info.





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -