Error in sum with individual data collected by Python Pandas???

Asked 2 years ago, Updated 2 years ago, 42 views

We put the combined values from column 1 to column 200 of the data collected by Pandas into column 201 and created a code to save them as a csv file.

(How to add column 1 values to column 201 and accumulate column 2 values to column 201)

The data by date showed unstable results, so I looked at the detailed data and it came out as below.

The values for each row and column come with the same repeated values, but the lower sum gives a different sum.

You want to get the value in column 201, and to get the value in column 201, each row must have a different value, even though the value in each row is filled with the same value throughout the column, it's strange that each row in column 201 has a different value.

Because you collect data in minutes and get the sum, each row may have the same value, but the data with the same entire column appears to be wrong.

My question is...

1) Are there visible and invisible values in each row except for column 201?

2) And why is this happening?

Has anyone experienced this problem?

python pandas

2022-09-22 19:26

1 Answers

I don't know if this is right

Based on the above screenshots...

I checked with Excel, and if you start from column A, you get 201 in column "GS" as shown below

Starting from column B, column 1 shows 200 in column "GS" as in your case.

However, the number of status lines is "200" different from the questioner. This means that the questioner also included data in column A before column B, column 1. However, the Sum value of the status row is weird like the GT column.

In conclusion, the fact that the Sum value of the state row is the same as that of the GT column shows that the GT column value is not calculated only from columns 1 to 200, but also the values of columns A unrelated to the table are included in the calculation.


2022-09-22 19:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.