I am new to python and so far I am loving the ipython notebook for learning. Am I using the to_csv() function to write out a pandas dataframe out to a file. I wanted to o
This is the better way of doing it. With context manager, you don't have to handle the file resource.
with open("thefile.csv", "w") as f: df.to_csv(f)