import matplotlib.pyplot as plt
import numpy as np
import pandas as pd


df = pd.read_csv('transcount.csv')
df = df.groupby('year').aggregate(np.mean)

gpu = pd.read_csv('gpu_transcount.csv')
gpu = gpu.groupby('year').aggregate(np.mean)

df = pd.merge(df, gpu, how='outer', left_index=True, right_index=True)
df = df.replace(np.nan, 0)
df.plot()
df.plot(logy=True)
df[df['gpu_trans_count'] > 0].plot(kind='scatter', x='trans_count', y='gpu_trans_count', loglog=True)
plt.show()

[((78, 107), 'pandas.read_csv', 'pd.read_csv', (['"""transcount.csv"""'], {}), "('transcount.csv')\n", (89, 107), True, 'import pandas as pd\n'), ((158, 191), 'pandas.read_csv', 'pd.read_csv', (['"""gpu_transcount.csv"""'], {}), "('gpu_transcount.csv')\n", (169, 191), True, 'import pandas as pd\n'), ((243, 308), 'pandas.merge', 'pd.merge', (['df', 'gpu'], {'how': '"""outer"""', 'left_index': '(True)', 'right_index': '(True)'}), "(df, gpu, how='outer', left_index=True, right_index=True)\n", (251, 308), True, 'import pandas as pd\n'), ((467, 477), 'matplotlib.pyplot.show', 'plt.show', ([], {}), '()\n', (475, 477), True, 'import matplotlib.pyplot as plt\n')]