Answers for "how to save a data frame with pandas"

2

create a df in pandas

import pandas as pd

data = {'First Column Name':  ['First value', 'Second value',...],
        'Second Column Name': ['First value', 'Second value',...],
         ....
        }

df = pd.DataFrame (data, columns = ['First Column Name','Second Column Name',...])
print (df)
Posted by: Guest on January-13-2021
11

save dataframe to csv

df.to_csv(file_name, sep='\t')
Posted by: Guest on May-07-2020

Code answers related to "how to save a data frame with pandas"

Python Answers by Framework

Browse Popular Code Answers by Language