save it instead as a hdf file using:
key refers to the object of the dataframe and mode is write ('w'), you can also use the append mode ('a') if you are saving it iteratively.
Once this is done, you can convert it back to csv if needed using:
df = pd.read_hdf(filename)
df.to_csv(filename)