Seeking help regarding Python code
Afraid the formatting gremlins got to your data before we saw it,
so I am taking a guess at what you want to achieve.
On 11/07/19 06:54, Debasree Banerjee wrote:
> I want to calculate the difference between LAQN_NO2 and NO2_RAW everyday at
> 04:00 and add that value to NO2_RAW values in all rows on a particular day.
> I have 2 months of data and I want to do this for each day.
What is the difference value at 04:00? Your times all appear to be the
same. You doubt you mean you run the program at 04:00 every day, because
that will not update any rows that don't yet exist, and anyway NO2_RAW +
(LAQN_NO2 - NO2_RAW) simply equals LAQN_NO2.
Once calculated, I would either store it in a new field (and add to
NO2_RAW on every use), or copy the whole day's dataset to a new table.
That way, should you have to re-run, you have not lost the old value of
Writing the code will come after you understand exactly what to achieve,
and how a computer could do it.