I have got a simple plot code from this excellent tutorial https://www.datacamp.com/tutorial/matplotlib-tutorial-python. import pandas as pd import matplotlib.pyplot as plt df = pd.read_csv('../RnOut/RAINFALL/STATS/06_CumulRn.txt') df = df.rename(columns = {' Date': 'Date', ' Mean': 'Mean'}) plt.plot(df['Date'], df['Mean']) plt.show() This gives me error on 6, underlining plt.plot(df['Date'], df['Mean']) ~~^^^^^^^^ and the error KeyError: 'Date' My data looks as follows Date Mean 1 0.1 2 0.1 3 0.1 4 0.1 5 0.1 6 0.3 7 0.3 8 0.3 9 0.4 10 0.4 .... Values go no to 183 11 0.9 12 1.2 13 1.7 14 1.8 15 2.5 16 3.0 17 4.2 18 4.3 19 4.5 20 4.6 21 5.6 22 6.8 23 7.6 24 9.1 25 10.1 26 10.3 27 11.1 28 11.1 29 11.2 30 11.3 31 14.5 32 15.2 33 15.4 34 16.1 35 16.7 36 19.7 37 20.1 38 20.9 39 22.0 40 26.7 41 28.9 42 31.6 43 34.5 44 36.5 45 38.7 46 41.5 47 46.4 48 48.1 49 50.4 50 53.9 51 56.5 52 58.2 53 62.6 54 65.3 55 69.1 56 72.4 57 76.0 58 78.9 59 80.3 60 84.7 61 89.2 62 93.3 63 96.6 64 102.1 65 106.1 66 109.6 67 118.3 68 122.8 69 128.8 70 139.4 71 148.8 72 157.6 73 168.5 74 171.7 75 181.8 76 186.6 77 194.1 78 202.7 79 210.6 80 219.7 81 227.9 82 236.4 83 241.0 84 249.2 85 258.0 86 264.6 87 269.5 88 279.5 89 283.7 90 289.7 91 300.6 92 304.2 93 313.6 94 321.4 95 329.5 96 337.9 97 346.0 98 351.9 99 358.8 100 362.4 101 367.5 102 373.3 103 381.2 104 391.2 105 398.8 106 407.3 107 415.3 108 424.3 109 433.4 110 444.3 111 452.4 112 463.0 113 472.1 114 482.0 115 486.7 116 491.1 117 499.6 118 504.0 119 512.4 120 520.0 121 527.7 122 536.1 123 542.5 124 548.2 125 558.3 126 563.1 127 570.2 128 579.8 129 587.1 130 594.1 131 600.7 132 604.8 133 609.6 134 620.7 135 624.9 136 632.2 137 638.0 138 650.2 139 657.0 140 663.4 141 670.7 142 675.6 143 683.0 144 691.7 145 700.7 146 707.2 147 716.9 148 729.2 149 736.9 150 747.7 151 757.1 152 757.1 153 763.9 154 773.7 155 781.9 156 790.9 157 795.9 158 806.0 159 812.0 160 818.6 161 824.9 162 830.0 163 834.4 164 840.5 165 845.5 166 851.5 167 855.7 168 861.5 169 867.2 170 872.0 171 877.9 172 880.1 173 886.9 174 891.1 175 894.4 176 900.4 177 906.7 178 911.5 179 916.0 180 920.4 181 923.3 182 926.8 183 928.7 Please help Continue reading...