Oct-29-2018, 11:46 AM
Hello,
I am dealing with a program, which puts together some datas from different files. I wrote a part of the code it looks like:
But I also wold like to insert a part to the code, which puts each row - so next to the dates - an intesity value, that would come from a file called mli_value_IHAR_date. This file looks contains a number, that I want to convert to a real number (405328.0):
2624 3127 4.05328e+05
So finally it would look like fowexample 20180101 405328.0.
Can anyone help me how to solve this problem?
Thanks
I am dealing with a program, which puts together some datas from different files. I wrote a part of the code it looks like:
for path, subdirs, files in os.walk(r'./'): for filename in files: if filename.startswith("mli_value_IHAR"): f = os.path.join(path, filename) date = (f[-12:-4]) myfile = open('test.txt', 'a') myfile.write(date + "\n") myfile.close()
But I also wold like to insert a part to the code, which puts each row - so next to the dates - an intesity value, that would come from a file called mli_value_IHAR_date. This file looks contains a number, that I want to convert to a real number (405328.0):
2624 3127 4.05328e+05
So finally it would look like fowexample 20180101 405328.0.
Can anyone help me how to solve this problem?
Thanks