{ "metadata": { "name": "", "signature": "sha256:3c972a8d25d3c4e3dee34035fc64c1d94ca60a988b96a6aee969248392b205c6" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "This short script converts the Excel files from the supplementary materials of Schich et al. to CSV text files (compressed with gzip).\n", "\n" ] }, { "cell_type": "code", "collapsed": false, "input": [ "import pandas as pd\n", "\n", "fnames = [\"SchichDataS1_FB.xlsx\", \"SchichDataS2_AKL.xlsx\",\n", " \"SchichDataS3_ULAN.xlsx\", \"SchichDataS4_WCEN.xlsx\"]\n", "\n", "for fi in fnames:\n", " print fi\n", " data = pd.read_excel(fi)\n", " data = data.convert_objects(convert_numeric=True)\n", " out_name = fi.replace(\".xlsx\", \".csv.gz\")\n", " out = gzip.open(out_name, \"w\")\n", " data.to_csv(out, encoding=\"utf-8\")\n", " out.close()" ], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }