csv - Python : How to replace particular value in dat file? -


i have data in dat file,

arun    20     123 rahul   34     456 

i want replace 34 38. like,

arun    20     123 rahul   38     456 

fletching data in list , updating , writing complete data in dat file doesn't efficient. want replace particular value , save it.

with plain files have no other solutions reading whole content , rewriting it. note simple short csv file won't hardly have performance issues.

the other solution use database, doubt more efficient 2 records 3 fields each. also, updating records in database require both write , read operations too, obviously.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -