Python Forum
Copy and append data from .dat file
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Copy and append data from .dat file
#7
Hi,

Ive tried that, that solves the error.
When i run the code, it Works ok.
But when i re-run the code some minute later, i get the data twice, same list of data below the previous copied data, with the missed data in those few minutes added to the copied data.

Thanks.

Heres an example of the actual output.
As you can see, it copies the data including the missing 3 minutes, 11:11 11:12 and 11:13:

"TOA5","CR1000","CR1000","20810","CR1000.Std.32.05","CPU:basic - kopie.CR1","13463","Table1"
"TIMESTAMP","RECORD","WS_kph_S_WVT","WindDir_D1_WVT","WindDir_SD1_WVT","WS_kph_Max","AirTC_Avg","AirTC_Max","AirTC_Min","RH_Avg","RH_Max","RH_Min","BP_mbar_Avg","BP_mbar_Max","BP_mbar_Min","Rain_mm_Tot","Rain_mm_Intensity_1_min","Rain_mm_Max_Intensity_1_min","Rain_mm_Min_Intensity_1_min","Tot_Rain_mm_12_sec_Max","Tot_Rain_mm_12_sec_Avg","Lufft_R2S_Mode","Mode(1)","Mode(2)","Mode(3)","Mode(4)","Mode(5)","Mode(6)","SlrW_Avg","SlrW_Max","TdC_Avg","TdC_Max","TdC_Min","TwC_Avg","TwC_Max","TwC_Min","HI_C_Avg","HI_C_Max","SVPWPa_Avg","SVPWPa_Max","SVPWPa_Min","SunHrs_Tot","PrecipitationHrs_Tot","PotSlrW_Avg","PotSlrW_Max","PotSlrW_Min","WC_C_Avg","WC_C_Min"
"TS","RN","kilometers/hour","Deg","Deg","kilometers/hour","Deg C","Deg C","Deg C","%","%","%","mbar","mbar","mbar","mm","","","","","","","","","","","","","W/m^2","W/m^2","Deg C","Deg C","Deg C","Deg C","Deg C","Deg C","Deg C","Deg C","Pa","Pa","Pa","hours","","W/m^2","W/m^2","W/m^2","Deg C","Deg C"
"","","WVc","WVc","WVc","Max","Avg","Max","Min","Avg","Max","Min","Avg","Max","Min","Tot","Smp","Smp","Smp","Max","Avg","Smp","Smp","Smp","Smp","Smp","Smp","Smp","Avg","Max","Avg","Max","Min","Avg","Max","Min","Avg","Max","Avg","Max","Min","Tot","Tot","Avg","Max","Min","Avg","Min"
"2020-01-17 11:07:00",1466,9.97,194.9,34.22,14.52,9.03,9.11,8.92,95.77014,95.8,95.7,1013.228,1013.254,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,57.17,61.14,8.4,8.48,8.29,8.69,8.77,8.57,9.03,9.11,1149,1156,1141,0,0,330.7,331.5,329.9,7.519,6.7
"2020-01-17 11:08:00",1467,8.34,186,44.19,13.41,9.04,9.1,8.94,95.76873,95.8,95.7,1013.225,1013.285,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,50.71,53.87,8.41,8.48,8.32,8.7,8.76,8.6,9.04,9.1,1151,1155,1143,0,0,332.3,333,331.5,7.864,6.933
"2020-01-17 11:09:00",1468,8.62,173,28.57,10.54,9.05,9.11,8.94,95.76466,95.8,95.7,1013.221,1013.285,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,49.06,52.41,8.41,8.49,8.31,8.71,8.77,8.6,9.05,9.11,1151,1156,1143,0,0,333.8,334.6,333.1,7.782,7.38
"2020-01-17 11:10:00",1469,9.86,177.6,18.33,13.82,9.04,9.11,8.97,95.76958,95.8,95.7,1013.238,1013.254,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,58.21,62.6,8.41,8.48,8.34,8.7,8.77,8.62,9.04,9.11,1151,1156,1145,0,0,335.4,336.2,334.6,7.571,6.892

"TOA5","CR1000","CR1000","20810","CR1000.Std.32.05","CPU:basic - kopie.CR1","13463","Table1"
"TIMESTAMP","RECORD","WS_kph_S_WVT","WindDir_D1_WVT","WindDir_SD1_WVT","WS_kph_Max","AirTC_Avg","AirTC_Max","AirTC_Min","RH_Avg","RH_Max","RH_Min","BP_mbar_Avg","BP_mbar_Max","BP_mbar_Min","Rain_mm_Tot","Rain_mm_Intensity_1_min","Rain_mm_Max_Intensity_1_min","Rain_mm_Min_Intensity_1_min","Tot_Rain_mm_12_sec_Max","Tot_Rain_mm_12_sec_Avg","Lufft_R2S_Mode","Mode(1)","Mode(2)","Mode(3)","Mode(4)","Mode(5)","Mode(6)","SlrW_Avg","SlrW_Max","TdC_Avg","TdC_Max","TdC_Min","TwC_Avg","TwC_Max","TwC_Min","HI_C_Avg","HI_C_Max","SVPWPa_Avg","SVPWPa_Max","SVPWPa_Min","SunHrs_Tot","PrecipitationHrs_Tot","PotSlrW_Avg","PotSlrW_Max","PotSlrW_Min","WC_C_Avg","WC_C_Min"
"TS","RN","kilometers/hour","Deg","Deg","kilometers/hour","Deg C","Deg C","Deg C","%","%","%","mbar","mbar","mbar","mm","","","","","","","","","","","","","W/m^2","W/m^2","Deg C","Deg C","Deg C","Deg C","Deg C","Deg C","Deg C","Deg C","Pa","Pa","Pa","hours","","W/m^2","W/m^2","W/m^2","Deg C","Deg C"
"","","WVc","WVc","WVc","Max","Avg","Max","Min","Avg","Max","Min","Avg","Max","Min","Tot","Smp","Smp","Smp","Max","Avg","Smp","Smp","Smp","Smp","Smp","Smp","Smp","Avg","Max","Avg","Max","Min","Avg","Max","Min","Avg","Max","Avg","Max","Min","Tot","Tot","Avg","Max","Min","Avg","Min"
"2020-01-17 11:07:00",1466,9.97,194.9,34.22,14.52,9.03,9.11,8.92,95.77014,95.8,95.7,1013.228,1013.254,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,57.17,61.14,8.4,8.48,8.29,8.69,8.77,8.57,9.03,9.11,1149,1156,1141,0,0,330.7,331.5,329.9,7.519,6.7
"2020-01-17 11:08:00",1467,8.34,186,44.19,13.41,9.04,9.1,8.94,95.76873,95.8,95.7,1013.225,1013.285,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,50.71,53.87,8.41,8.48,8.32,8.7,8.76,8.6,9.04,9.1,1151,1155,1143,0,0,332.3,333,331.5,7.864,6.933
"2020-01-17 11:09:00",1468,8.62,173,28.57,10.54,9.05,9.11,8.94,95.76466,95.8,95.7,1013.221,1013.285,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,49.06,52.41,8.41,8.49,8.31,8.71,8.77,8.6,9.05,9.11,1151,1156,1143,0,0,333.8,334.6,333.1,7.782,7.38
"2020-01-17 11:10:00",1469,9.86,177.6,18.33,13.82,9.04,9.11,8.97,95.76958,95.8,95.7,1013.238,1013.254,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,58.21,62.6,8.41,8.48,8.34,8.7,8.77,8.62,9.04,9.11,1151,1156,1145,0,0,335.4,336.2,334.6,7.571,6.892
"2020-01-17 11:11:00",1470,7.879,176.4,34.06,11.22,9.05,9.1,8.97,95.78661,95.8,95.7,1013.219,1013.254,1013.161,0,0,0,0,0,0,0,0,0,0,0,0,0,64.3,65.51,8.42,8.47,8.34,8.71,8.76,8.63,9.05,9.1,1151,1155,1145,0,0,336.9,337.7,336.2,7.982,7.326
"2020-01-17 11:12:00",1471,9.48,170.7,29.66,14.01,9.06,9.15,8.99,95.79492,95.8,95.8,1013.218,1013.254,1013.192,0,0,0,0,0,0,0,0,0,0,0,0,0,62.72,64.06,8.44,8.52,8.36,8.72,8.8,8.64,9.06,9.15,1152,1159,1146,0,0,338.5,339.2,337.7,7.661,6.923
"2020-01-17 11:13:00",1472,10.48,184.6,28.24,16.13,9.07,9.16,8.98,95.79506,95.8,95.8,1013.231,1013.285,1013.13,0,0,0,0,0,0,0,0,0,0,0,0,0,54.98,59.69,8.44,8.54,8.35,8.73,8.82,8.64,9.07,9.16,1153,1160,1146,0,0,340,340.7,339.3,7.498,6.579


Thanks.
Reply


Messages In This Thread
Copy and append data from .dat file - by Makada - Jan-16-2020, 09:00 PM
RE: Copy and append data from .dat file - by Makada - Jan-17-2020, 08:04 AM
RE: Copy and append data from .dat file - by Makada - Jan-17-2020, 11:13 AM
RE: Copy and append data from .dat file - by Makada - Jan-17-2020, 12:56 PM
RE: Copy and append data from .dat file - by Makada - Jan-17-2020, 01:36 PM
RE: Copy and append data from .dat file - by Makada - Jan-17-2020, 04:45 PM
RE: Copy and append data from .dat file - by Makada - Jan-17-2020, 08:27 PM
RE: Copy and append data from .dat file - by Makada - Jan-17-2020, 09:42 PM
RE: Copy and append data from .dat file - by Makada - Jan-18-2020, 10:06 AM
RE: Copy and append data from .dat file - by Makada - Jan-19-2020, 03:35 PM
RE: Copy and append data from .dat file - by Makada - Jan-19-2020, 04:45 PM
RE: Copy and append data from .dat file - by Makada - Jan-20-2020, 08:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Why is the copy method name in python list copy and not `__copy__`? YouHoGeon 2 388 Apr-04-2024, 01:18 AM
Last Post: YouHoGeon
  Copy Paste excel files based on the first letters of the file name Viento 2 560 Feb-07-2024, 12:24 PM
Last Post: Viento
  How to copy work sheet data one workbook to other? sayyedkamran 2 787 Nov-03-2023, 09:10 AM
Last Post: Larz60+
  Copy data from Excel and paste into Discord (Midjourney) Joe_Wright 4 2,282 Jun-06-2023, 05:49 PM
Last Post: rajeshgk
Question How to append integers from file to list? Milan 8 1,606 Mar-11-2023, 10:59 PM
Last Post: DeaD_EyE
  is it possible to copy image from email and place into excel file? cubangt 3 1,352 Nov-30-2022, 05:11 PM
Last Post: snippsat
  Please help me [copy and paste file from src to dst] midomarc 2 1,091 Nov-24-2022, 10:13 PM
Last Post: midomarc
  read a text file, find all integers, append to list oldtrafford 12 3,930 Aug-11-2022, 08:23 AM
Last Post: Pedroski55
  How to modify python script to append data on file using sql server 2019? ahmedbarbary 1 1,288 Aug-03-2022, 06:03 AM
Last Post: Pedroski55
  Append data to Yaml section tbaror 0 7,164 Feb-09-2022, 06:56 PM
Last Post: tbaror

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020