Is there a library/command in python to change a value in a specific location in a text file?
E.g. lets say I have a file called test.txt containing following data:
abc 123.2 45 text_data
ghk 12.43 123.45 89.3
The key thing is that this text file cannot be read as a structured data e.g. by using pandas or assuming that regular columns exist.
So, I have a separate file where I specify the row and columns which need to be changed to a new value.
row column_start column_end new_value
2 5 9 10.4
Should replace 12.43 in the 2nd row with 10.4 in test.txt