raw_data = {'first_name': ['John', 'Jane', 'Jim'],
'last_name': ['Doe', 'Smith', 'Jones'],
'department': ['Accounting', 'Sales', 'Engineering'],}
df = pd.DataFrame(raw_data,columns=raw_data.keys())
df.to_csv('data_file.csv')