Last active
August 29, 2015 14:06
-
-
Save t0mst0ne/0b103ead3bd37084482f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
for i in range (1, 21): | |
data = pd.read_csv('../' + str(i) + '.csv') | |
delta = data["Total"] - data["First"] - data["Second"] - data["Third"] | |
data['delta'] = delta | |
data['one'] = 1 | |
Age = data.ix[data20['County']=='TPE'] | |
Age = pd.tools.pivot.pivot_table(Age, values='one', index=['delta'], columns=['Age'],aggfunc=np.sum, margins = False) | |
print Age.T.plot() | |
Age.T.plot().savefig('/path/to/figure.pdf') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment