Python logo
May 1, 2019 * Python Programming

Sample data for Python tutorials

List of all the files used in the Python tutorials by section. You can download the files from here.

Pandas

[1] Copy text below, paste into a text editor and save as data_deposits.csv.
Download file into folder with Python code: DemoCSV - Name and bank deposits

data_deposits.csv

firstname,lastname,city,age,deposit
Herman,Sanchez,Miami,52,9300
Phil,Parker,Miami,45,5010
Bradie,Garnett,Denver,36,6300
Rudolf,Crooks,Miami,33,5800
Marcos,Miller,Seattle,66,4300
Chad,Garnett,Miami,38,7420
Sally,Evans,Denver,25,3170
Chad,Parker,Seattle,55,12600

[2] Copy text below, paste into a text editor and save as data_deposits_extra.csv
Download file into folder with Python code: DemoCSV - Name and bank deposits - extra

data_deposits_extra.csv

firstname,lastname,city,age,deposit
Elli,Laforge,Denver,53,2038
Elli,Laforge,Miami,53,6310
Sally,Evans,Denver,25,3170
Phil,Parker,Denver,49,9010
Joe,Laforge,Seatle,51,15380

[3] Copy text below, paste into a text editor and save as data_contacts.csv
Download file into folder with Python code: Demo CSV - Name and contacts

data_contacts.csv

firstname,lastname,age,email
Bradie,Garnett,36,gbr@garnett.net
Chad,Garnett,38,,gch@garnett.net
Chad,Parker,55,cp@kit.edu
Herman,Sanchez,52,she@garnett.net
Marcos,Miller,66,idea@zmail.com
Phil,Parker,49,pkphil@zmail.com
Rudolf,Crooks,33,cr@kit.edu
Sally,Evans,25,sally.evans@zmail.com
Sally,Evans,25,s.evans@zmail.com

[4] Copy text below, paste into a text editor and save as data_contacts.tsv

TSV extension is for tab separated values. Please do not change the tabs to spaces.
Download file into folder with Python code: DemoTSV: Tab separated name and deposits

data_deposts.tsv (Tab separated values)

firstname	lastname	city	age	deposit
Herman	Sanchez	Miami	52	9300
Phil	Parker	Miami	45	5010
Bradie	Garnett	Denver	36	6300
Rudolf	Crooks	Miami	33	5800
Marcos	Miller	Seattle	66	4300
Chad	Garnett	Miami	38	7420
Sally	Evans	Denver	25	3170
Chad	Parker	Seattle	55	12600

[5] Copy text below, paste into a text editor and save as data_contacts.ssv

SSV extension is for space separated values.
Download file into folder with Python code: DemoSSV: Space separated name and deposits

data_deposits.ssv (Variable count space separated values)

firstname lastname city age deposit
Herman   Sanchez Miami   52 9300
Phil Parker Miami 45    5010
Bradie   Garnett  Denver 36   6300
Rudolf  Crooks Miami 33 5800
Marcos Miller      Seattle 66 4300
Chad Garnett   Miami   38 7420
Sally     Evans Denver 25   3170
Chad    Parker Seattle    55 12600

[6] Copy text below, paste into a text editor and save as data_contacts.abc

ABC extension is being used for custom separator as 'abc' letter sequence.
Download file into folder with Python code: DemoABC: Custom separator for name and deposits

data_deposits.abc (Custom data separator = 'abc')

firstnameabclastnameabccityabcageabcdeposit
HermanabcSanchezabcMiamiabc52abc9300
PhilabcParkerabcMiamiabc45abc5010
BradieabcGarnettabcDenverabc36abc6300
RudolfabcCrooksabcMiamiabc33abc5800
MarcosabcMillerabcSeattleabc66abc4300
ChadabcGarnettabcMiamiabc38abc7420
SallyabcEvansabcDenverabc25abc3170
ChadabcParkerabcSeattleabc55abc12600