I have a for loop that is generating files with two columns. It's been working just fine for months now. I use spyder as my python environment. I opened spyder about a week ago and it said it was unable to access the kernel. I ran some pip installs to fix the kernel problem. I can't remember which at the moment. The kernel is working but one line of code isn't operational:
per_lambob = np.savetxt(f'/Users/laurenhiggins/Desktop/CIB_Research/Jnir_spectra/tables/z_Inu_per_lambobs2{t}.txt', np.c_[z_arrayl2, Inu])
I keep getting a syntax error. I've tried taking out the "f" before the filename. This allows the code to run but it doesn't save the files properly. All I get is one file with the literal file name above with data from the last iteration through the loop, rather than looping through and saving each file.
Any suggestions? I'm happy to clarify anything if I was unclear or if you want to see more of the code.