Re: Seeking help regarding Python code
On Thu, 11 Jul 2019 06:54:21 +0100, Debasree Banerjee wrote: > > I have a dataset like this: > > RecTime > > NO2_RAW > > NO2 > > LAQN_NO2 > > 10980 > > 06/6/19 01:45 > > 17.9544 [snip] > > Can someone please help? Your question might appear intelligibly on the mailing list (I can't tell), but it is mangled into unintelligibility on the newsgroup. My guess is that instead of double-spaced mixed-type data fields, you intended to present an input table like this: RecTime NO2_RAW NO2 LAQN_NO2 10980 06/6/19 01:45 17.9544 53.4626 17.7 10981 06/6/19 01:45 17.9444 53.4434 17.7 10982 06/6/19 01:45 17.9211 53.3988 17.7 I really can't tell what you want the output to look like. -- To email me, substitute nowhere->runbox, invalid->com. -- https://mail.python.org/mailman/listinfo/python-list
Re: Seeking help regarding Python code
Hi, 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 NO2_RAW. Writing the code will come after you understand exactly what to achieve, and how a computer could do it. Regards Ian (Another one). -- https://mail.python.org/mailman/listinfo/python-list
Seeking help regarding Python code
Hi, I have a dataset like this: RecTime NO2_RAW NO2 LAQN_NO2 10980 06/6/19 01:45 17.9544 53.4626 17.7 10981 06/6/19 01:45 17.9444 53.4434 17.7 10982 06/6/19 01:45 17.9211 53.3988 17.7 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. So, I want a table like this RecTime NO2_RAW NO2 LAQN_NO2 NO2_Cal 10980 06/6/19 01:45 17.9544 53.4626 17.7 (LAQN_NO2-NO2_RAW)+NO2_RAW 10981 06/6/19 01:45 17.9444 53.4434 17.7 10982 06/6/19 01:45 17.9211 53.3988 17.7 Can someone please help? Thanks Debasree -- https://mail.python.org/mailman/listinfo/python-list