Exercise 3: Pandas
- Due Oct 3, 2014 by 11:59pm
- Points 10
- Submitting a file upload
- Available after Oct 2, 2014 at 11am
The objective of this exercise is to get some practice reading and writing files in different formats.
For this exercise, review chapter 6 in Python for Data Analysis, and the documentation for reading and writing files, here: http://pandas.pydata.org/pandas-docs/stable/io.html
Select 3 of the data formats from this list, and either obtain (from anywhere) or create by hand a file in each of the selected formats (getting one would be preferred - the more realistic the better). Create a notebook in which you use the relevant methods to load the selected data into a DataFrame, and demonstrate that it was loaded correctly, overcoming any formatting issues you might encounter with the file -- by printing the first 10 rows of the file, and by running descriptive statistics on the contents of the file. Once you have done this, write the files back out to another file format (one of the original 3 formats, or others), in each case changing the format of the file (e.g. read a csv file and write it back out as an excel file).