0

Evening all,

Another request for help and the usual caveat - i am a novice when it comes to python and all things coding!

So, i have created a script which imports various data which i have cleaned and then formatted and processed to arrive at a number of key output values. The script alters the original data set each time it is run using the random function.

I now want to be able to run the entire script automatically n times, and capture the various key outputs in a new data frame. I can then calculate the mean of the key values.

All thoughts welcome. thank you in advance.

Paul

Paul Allen
  • 25
  • 5
  • 1
    Perhaps wrap the script in a function and [execute it repeatedly](https://stackoverflow.com/questions/474528/what-is-the-best-way-to-repeatedly-execute-a-function-every-x-seconds)? – S.Au.Ra.B.H Jul 03 '20 at 02:59
  • hi Saurjog, it did cross my mind but there are many many commands, would it just be a case of copying and pasting within a function? I'd then just have one command which would be the function? – Paul Allen Jul 03 '20 at 06:00
  • yes, depending on the complexity, it may be as simple as creating a new function. Difficult to tell without sample code structure. – S.Au.Ra.B.H Jul 03 '20 at 06:30
  • 1
    well, it has worked. Probably not the prettiest or most efficient function you will ever see but it does produce the required output. Thank you. – Paul Allen Jul 04 '20 at 13:21

0 Answers0