0

I already have an existing text file with data. I wanted to append the model.summary() data to an already existing text file. I found here, that by using:

with open('modelsummary.txt', 'w') as f:
    with redirect_stdout(f):
        model.summary()

I can save the model.summary() to a text file.

I however what the model summary data appended to an already existing text file during run time without generating a new txt file.

Any help will be greatly appreciated.

Thanks!

Joe
  • 220
  • 1
  • 5
  • 21

0 Answers0