Wednesday, October 10, 2012

Merging two csv files -- replacing some lines with those from the second

I had to redo the photometry for some galaxies, and afterwards I was left with two csv files. Some of the entries in the first one had to be replaced with those from the second. I did it with vim, first, because I like it, but I'm not a typist. I had it easy, because the entries started with galaxy IDs, which in a way correspond to their line numbers.
https://github.com/astrolitterbox/growth-curve-photometry/blob/noSciPy/replace_lines.py

No comments:

Post a Comment