June 2018
Beginner
508 pages
13h 8m
English
We can save DataFrame in many different ways. You can type df.to_ and then press Tab to make autocompletion pop up, to see all the possible options.
We're going to save DataFrame in three different formats, just for fun. First, CSV:
#21df.to_csv('df.csv')
Then JSON:
#22df.to_json('df.json')
And finally, in an Excel spreadsheet:
#23df.to_excel('df.xls')
The CSV file looks like this (output truncated):
,Type,Start,End,Duration,Day of Week,Budget,Currency,Clicks,Im0,KTR,2019-03-24,2020-11-06,593,Sunday,847110,EUR,62554,4999971,GRZ,2017-05-21,2018-07-24,429,Sunday,510835,GBP,36176,5000012,KTR,2017-12-18,2018-02-08,52,Monday,720897,GBP,62299,500001,
And the JSON one looks like this (again, output truncated):
{ "Age": ...Read now
Unlock full access