Question
weather_data.txt (just copy and paste into a txt file called weather_data, then solve above question) date,actual_mean_temp,actual_min_temp,actual_max_temp,average_min_temp,average_max_temp,record_min_temp,record_max_temp,record_min_temp_year,record_max_temp_year,actual_precipitation,average_precipitation,record_precipitation 2014-7-1,81,70,91,67,89,56,104,1919,2012,0.00,0.10,5.91 2014-7-2,85,74,95,68,89,56,101,2008,1931,0.00,0.10,1.53 2014-7-3,82,71,93,68,89,56,99,2010,1931,0.14,0.11,2.50 2014-7-4,75,64,86,68,89,55,99,1933,1955,0.00,0.10,2.63 2014-7-5,72,60,84,68,89,57,100,1967,1954,0.00,0.10,1.65 2014-7-6,74,61,87,68,89,57,99,1964,1948,0.00,0.10,1.95 2014-7-7,79,67,91,68,89,55,100,1972,1954,0.00,0.11,2.37 2014-7-8,83,72,94,68,89,58,101,1892,2010,0.00,0.11,1.87 2014-7-9,80,71,89,68,89,57,101,1891,1986,0.15,0.12,3.71
weather_data.txt (just copy and paste into a txt file called weather_data, then solve above question)
date,actual_mean_temp,actual_min_temp,actual_max_temp,average_min_temp,average_max_temp,record_min_temp,record_max_temp,record_min_temp_year,record_max_temp_year,actual_precipitation,average_precipitation,record_precipitation 2014-7-1,81,70,91,67,89,56,104,1919,2012,0.00,0.10,5.91 2014-7-2,85,74,95,68,89,56,101,2008,1931,0.00,0.10,1.53 2014-7-3,82,71,93,68,89,56,99,2010,1931,0.14,0.11,2.50 2014-7-4,75,64,86,68,89,55,99,1933,1955,0.00,0.10,2.63 2014-7-5,72,60,84,68,89,57,100,1967,1954,0.00,0.10,1.65 2014-7-6,74,61,87,68,89,57,99,1964,1948,0.00,0.10,1.95 2014-7-7,79,67,91,68,89,55,100,1972,1954,0.00,0.11,2.37 2014-7-8,83,72,94,68,89,58,101,1892,2010,0.00,0.11,1.87 2014-7-9,80,71,89,68,89,57,101,1891,1986,0.15,0.12,3.71 2014-7-10,78,71,85,68,89,53,101,1961,1926,0.0,0.11,2.45 2014-7-11,78,68,87,68,89,55,100,1961,1986,0.00,0.12,3.10 2014-7-12,79,67,91,68,89,59,102,1953,1930,0.00,0.11,1.95 2014-7-13,81,69,92,68,89,56,100,1918,1986,0.00,0.12,2.09 2014-7-14,85,74,96,68,89,59,102,2007,1954,0.00,0.12,2.15 2014-7-15,81,67,94,68,89,58,100,2001,1893,0.87,0.12,4.61 2014-7-16,76,66,85,68,89,58,100,2001,1887,0.00,0.12,1.47 2014-7-17,74,63,84,68,89,62,100,1886,1986,0.00,0.12,4.14 2014-7-18,77,70,83,68,89,62,102,1896,1887,0.0,0.12,1.82 2014-7-19,70,66,74,68,89,60,103,2009,1986,0.17,0.12,2.30 2014-7-20,74,65,83,68,89,60,101,1910,1986,0.0,0.12,1.25 2014-7-21,74,70,77,68,89,57,103,1890,1986,1.30,0.12,3.83 2014-7-22,79,72,85,68,89,58,103,2001,1926,0.0,0.12,2.56 2014-7-23,80,69,90,68,89,56,101,2007,1987,0.00,0.13,6.88 2014-7-24,80,71,89,68,89,59,100,1947,1952,0.06,0.12,2.83 2014-7-25,77,68,86,68,89,62,101,1947,2010,0.00,0.13,2.34 2014-7-26,78,66,89,68,89,60,100,1904,2005,0.00,0.13,2.84 2014-7-27,80,70,90,68,89,57,103,1920,1940,0.18,0.13,2.46 2014-7-28,79,68,90,68,89,54,102,1962,1952,0.06,0.13,2.98 2014-7-29,73,62,83,68,89,59,103,1920,1952,0.00,0.14,2.04 2014-7-30,74,63,85,68,89,58,101,1914,2011,0.00,0.14,4.24 2014-7-31,72,65,78,68,89,56,100,1914,1999,1.45,0.14,1.45 2014-8-1,68,65,70,68,89,58,98,1966,1957,2.39,0.14,2.39 2014-8-2,69,65,72,68,89,59,98,1895,1942,0.00,0.14,2.00 2014-8-3,77,67,86,68,89,60,98,1998,2011,0.00,0.15,4.51 2014-8-4,78,69,87,68,89,58,98,1912,1935,0.00,0.15,2.59 2014-8-5,77,65,88,68,89,55,100,1912,1954,0.00,0.15,3.01 2014-8-6,78,68,88,68,88,57,102,1912,1956,0.17,0.14,3.19 2014-8-7,78,67,88,68,88,50,100,2004,1963,0.00,0.13,1.53 2014-8-8,77,73,81,68,88,55,102,2004,2007,0.0,0.13,1.37 2014-8-9,76,68,84,68,88,56,104,2002,2007,0.00,0.13,1.26 2014-8-10,70,67,73,68,88,56,104,1879,2007,0.01,0.13,2.26 2014-8-11,78,71,85,68,88,58,98,1879,1956,0.58,0.13,3.04 2014-8-12,81,72,89,68,88,57,100,1890,1925,0.31,0.13,2.25 2014-8-13,75,65,84,68,88,57,102,1979,1956,0.00,0.14,1.27 2014-8-14,71,59,83,68,88,57,98,1967,1925,0.00,0.14,2.00 2014-8-15,73,60,86,68,88,55,99,1964,2007,0.00,0.14,3.17 2014-8-16,77,68,86,68,88,57,102,1924,1954,0.00,0.14,2.51 2014-8-17,78,67,89,67,88,55,97,1979,1911,0.00,0.14,2.92 2014-8-18,81,71,90,67,88,59,101,1976,1988,0.0,0.13,1.76 2014-8-19,80,70,90,67,87,59,100,1981,1988,0.0,0.14,1.96 2014-8-20,79,67,91,67,87,56,103,1918,1925,0.00,0.14,1.84 2014-8-21,80,67,93,67,87,56,103,1998,1983,0.00,0.13,2.22 2014-8-22,83,70,95,67,87,57,101,1886,1983,0.00,0.15,2.81 2014-8-23,82,73,91,67,87,53,103,1930,1983,0.08,0.13,2.74 2014-8-24,74,66,81,67,87,55,97,1888,1968,0.14,0.14,2.35 2014-8-25,72,60,83,66,87,56,98,1952,1943,0.00,0.14,3.16 2014-8-26,72,60,84,66,87,55,100,1942,1954,0.00,0.14,5.36 2014-8-27,72,57,87,66,86,55,101,1952,1954,0.00,0.13,4.39 2014-8-28,77,61,92,66,86,55,98,1905,1924,0.00,0.13,4.64 2014-8-29,79,69,88,66,86,54,100,1986,1948,0.00,0.13,1.42 2014-8-30,79,68,90,66,86,53,101,1965,1932,0.00,0.12,2.54 2014-8-31,83,74,91,65,86,53,99,1946,1957,0.06,0.12,3.40 2014-9-1,82,71,93,65,85,51,99,1999,1957,0.00,0.11,2.93 2014-9-2,82,69,94,65,85,53,99,1967,1932,0.0,0.12,1.20 2014-9-3,81,68,93,65,85,52,98,1967,1925,0.63,0.11,2.67 2014-9-4,77,69,85,64,85,54,100,1952,1925,0.82,0.11,1.15 2014-9-5,79,69,89,64,84,54,101,1967,1954,0.01,0.11,2.46 2014-9-6,80,70,90,64,84,53,104,1924,1954,0.00,0.11,3.47 2014-9-7,79,70,88,64,84,53,100,1924,1925,0.09,0.11,2.38 2014-9-8,70,67,73,63,84,54,99,1988,1925,0.0,0.11,1.96 2014-9-9,72,66,77,63,83,46,101,1998,1939,0.00,0.11,1.92 2014-9-10,72,65,79,63,83,47,98,1998,1939,0.00,0.10,3.64 2014-9-11,77,64,89,62,83,49,96,1956,1925,0.09,0.10,1.80 2014-9-12,81,72,90,62,83,45,95,1917,1925,0.08,0.09,1.76 2014-9-13,76,66,86,62,82,49,94,1917,1962,1.56,0.11,4.12 2014-9-14,66,62,69,61,82,47,97,1985,1897,0.0,0.10,3.23 2014-9-15,76,65,86,61,81,47,96,2000,1956,0.37,0.11,4.06 2014-9-16,76,65,86,61,81,47,96,2000,1956,0.37,0.11,4.06 2014-9-17,69,63,74,60,81,46,96,1984,1954,0.00,0.11,3.14 2014-9-18,71,62,80,60,81,48,99,2001,1896,0.00,0.11,4.84 2014-9-19,73,67,79,59,80,46,97,1984,1954,0.02,0.10,2.72 2014-9-20,71,59,82,59,80,45,98,1929,1925,0.00,0.11,2.82 2014-9-21,71,57,85,59,80,43,97,1918,1895,0.00,0.11,2.74 2014-9-22,69,61,76,58,79,43,98,1918,1895,0.00,0.10,2.92 2014-9-23,59,53,65,58,79,39,97,1999,1931,0.02,0.11,1.69 2014-9-24,59,53,64,57,79,43,95,1999,1895,0.19,0.10,3.89 2014-9-25,66,61,70,57,78,40,94,1887,2010,0.01,0.11,1.31 2014-9-26,67,62,71,57,78,42,94,1950,1961,0.0,0.11,2.54 2014-9-27,69,59,78,56,78,43,93,1940,1900,0.00,0.11,1.94 2014-9-28,68,60,76,56,77,41,93,1947,1954,0.00,0.12,3.38 2014-9-29,67,64,70,55,77,40,93,1942,1941,0.09,0.11,3.59 2014-9-30,71,59,83,55,77,38,91,1888,1926,0.00,0.12,3.65 2014-10-1,70,56,84,54,76,39,92,1899,1954,0.00,0.12,3.80 2014-10-2,72,59,85,54,76,36,92,1899,1954,0.00,0.11,1.60 2014-10-3,70,61,79,54,76,36,91,1974,1954,0.03,0.12,2.15 2014-10-4,55,43,67,53,75,33,95,1974,1954,0.00,0.12,4.21 2014-10-5,52,38,65,53,75,38,97,1974,1954,0.00,0.12,1.16 2014-10-6,62,47,76,52,75,38,98,1935,1954,0.00,0.12,1.98 2014-10-7,67,53,80,52,74,34,91,1935,1951,0.00,0.11,2.70 2014-10-8,72,58,86,52,74,34,93,1889,1941,0.00,0.12,3.82 2014-10-9,66,52,80,51,74,31,92,2000,2007,0.00,0.12,3.80 2014-10-10,72,60,84,51,74,30,89,2000,1939,0.00,0.11,4.18 2014-10-11,78,68,87,51,73,29,90,2000,1939,0.08,0.12,2.58 2014-10-12,63,58,68,50,73,31,87,1906,1919,0.02,0.12,2.82 2014-10-13,66,59,72,50,73,35,91,1964,1954,0.04,0.12,1.93 2014-10-14,73,64,82,49,72,32,87,2006,1940,0.45,0.11,2.27 2014-10-15,66,58,73,49,72,30,88,2006,1985,0.24,0.11,1.83 2014-10-16,61,50,71,49,72,35,87,1939,1925,0.0,0.11,4.76 2014-10-17,59,44,74,48,71,35,85,2001,1962,0.00,0.11,1.90 2014-10-18,65,53,76,48,71,31,87,2001,1938,0.00,0.12,2.34 2014-10-19,57,45,69,48,71,30,87,2009,1938,0.00,0.10,1.20 2014-10-20,59,46,71,47,71,30,86,1972,1926,0.0,0.11,2.33 2014-10-21,61,47,75,47,70,30,88,1952,1943,0.00,0.11,1.31 2014-10-22,56,44,68,47,70,29,85,1952,1939,0.00,0.10,4.52 2014-10-23,55,40,70,46,70,31,88,1998,1941,0.00,0.11,1.72 2014-10-24,54,39,69,46,70,28,88,2006,1939,0.00,0.10,0.85 2014-10-25,57,39,74,46,69,27,84,2006,1931,0.00,0.09,2.65 2014-10-26,66,48,83,45,69,27,86,2013,1940,0.00,0.10,1.85 2014-10-27,62,43,80,45,69,24,86,1962,1939,0.00,0.09,2.03 2014-10-28,68,52,84,45,68,26,87,2001,1940,0.00,0.10,1.23 2014-10-29,69,58,79,44,68,27,82,1976,1984,0.00,0.10,1.65 2014-10-30,57,45,68,44,68,26,84,1952,1950,0.00,0.10,2.51 2014-10-31,50,39,61,44,68,29,85,2008,1950,0.49,0.10,1.68 2014-11-1,47,40,53,43,67,29,84,1954,1950,0.28,0.10,1.14 2014-11-2,44,30,57,43,67,27,85,1954,1961,0.00,0.10,1.82 2014-11-3,45,24,65,43,67,24,84,1954,1961,0.00,0.10,1.69 2014-11-4,53,39,67,43,66,22,83,1966,1961,0.00,0.10,1.97 2014-11-5,60,49,70,42,66,24,81,2006,2003,0.00,0.10,0.97 2014-11-6,60,48,71,42,66,26,82,1976,2003,0.04,0.10,1.34 2014-11-7,50,39,61,42,65,26,78,1998,1888,0.00,0.10,1.71 2014-11-8,45,31,58,41,65,25,78,1967,1934,0.00,0.11,2.79 2014-11-9,51,38,63,41,65,24,82,1976,2005,0.00,0.10,2.76 2014-11-10,51,32,69,41,64,28,83,1973,2006,0.00,0.10,1.43 2014-11-11,57,39,74,41,64,24,78,1973,2006,0.00,0.09,1.82 2014-11-12,59,41,77,40,64,24,81,1894,1989,0.00,0.10,1.54 2014-11-13,53,46,60,40,63,21,81,2013,1931,0.0,0.10,1.93 2014-11-14,37,28,46,40,63,21,80,2013,1879,0.01,0.11,1.23 2014-11-15,35,25,45,39,63,20,82,1969,1993,0.00,0.10,1.32 2014-11-16,41,29,53,39,62,22,82,1969,1958,0.00,0.10,2.26 2014-11-17,47,36,57,39,62,20,84,1883,1958,0.63,0.11,1.90 2014-11-18,30,20,39,38,62,20,78,2014,1942,0.00,0.10,1.93 2014-11-19,29,14,44,38,61,14,78,2014,1942,0.00,0.11,2.04 2014-11-20,47,34,59,38,61,18,79,1951,1942,0.00,0.11,1.36 2014-11-21,44,30,58,38,61,19,78,1914,1942,0.00,0.11,3.26 2014-11-22,39,22,55,37,60,13,76,2008,2011,0.00,0.11,1.68 2014-11-23,54,42,65,37,60,18,78,1880,1900,1.72,0.11,1.72 2014-11-24,67,59,74,37,59,16,75,1970,1958,0.00,0.11,1.68 2014-11-25,58,49,66,37,59,13,76,1970,1921,0.22,0.10,2.42 2014-11-26,46,40,52,36,59,11,75,1950,2001,0.89,0.11,2.36 2014-11-27,43,34,52,36,58,18,77,1903,2001,0.00,0.11,1.54 2014-11-28,36,25,47,36,58,19,77,2013,1990,0.00,0.11,2.93 2014-11-29,44,31,56,35,58,20,76,1955,2001,0.00,0.12,1.37 2014-11-30,54,39,68,35,57,15,76,1929,1991,0.00,0.11,2.09 2014-12-1,57,41,73,35,57,15,76,1964,1946,0.00,0.11,1.21 2014-12-2,49,42,55,35,57,20,76,1924,1991,0.00,0.11,1.85 2014-12-3,53,42,64,34,56,20,75,1960,1998,0.0,0.12,2.96 2014-12-4,56,49,63,34,56,18,76,2000,1956,0.0,0.11,1.93 2014-12-5,47,42,51,34,56,18,75,1969,1998,0.04,0.11,2.06 2014-12-6,47,42,52,34,55,18,78,1895,1998,0.12,0.10,2.37 2014-12-7,48,39,56,33,55,12,76,2010,1998,0.00,0.10,1.56 2014-12-8,40,36,43,33,55,10,76,1882,1998,0.14,0.11,1.15 2014-12-9,46,37,55,33,54,14,78,2006,1943,0.0,0.10,1.78 2014-12-10,43,32,53,33,54,13,80,1917,2007,0.00,0.10,1.91 2014-12-11,37,23,51,33,54,13,79,1957,2007,0.00,0.11,1.69 2014-12-12,41,22,60,32,54,7,79,1962,2007,0.00,0.11,1.57 2014-12-13,46,25,66,32,53,2,77,1962,2007,0.00,0.10,1.78 2014-12-14,46,29,63,32,53,12,73,1962,1948,0.00,0.10,2.38 2014-12-15,43,26,60,32,53,10,73,2010,1948,0.00,0.10,2.46 2014-12-16,48,37,58,32,53,12,75,1958,1971,0.09,0.10,1.58 2014-12-17,46,31,60,32,52,14,73,1901,1956,0.00,0.10,1.30 2014-12-18,43,30,56,31,52,11,75,1953,1984,0.00,0.10,1.74 2014-12-19,43,30,56,31,52,11,76,1963,1984,0.00,0.11,0.85 2014-12-20,44,40,48,31,52,12,79,1884,1931,0.03,0.10,2.38 2014-12-21,47,42,51,31,52,10,73,1901,2013,0.0,0.10,2.19 2014-12-22,42,38,46,31,51,11,72,1960,1998,0.26,0.11,2.27 2014-12-23,42,37,47,31,51,8,73,1989,1990,0.29,0.11,2.12 2014-12-24,53,45,60,31,51,6,71,1983,1982,0.91,0.11,1.47 2014-12-25,45,32,57,30,51,4,77,1983,1955,0.00,0.10,2.32 2014-12-26,43,27,59,30,51,6,76,1983,1889,0.00,0.11,1.72 2014-12-27,48,32,64,30,51,15,72,1970,1971,0.00,0.10,1.25 2014-12-28,55,49,60,30,51,10,77,1925,1971,0.04,0.11,1.67 2014-12-29,51,44,58,30,51,2,74,1894,1984,0.59,0.10,1.82 2014-12-30,39,32,45,30,50,-5,76,1880,1984,0.06,0.10,1.21 2014-12-31,37,27,46,30,50,0,70,1890,1996,0.00,0.10,2.15
1. In NumPy, do the following without hardcoding the values into the arrays or using for loops: a. Create and print a 42 matrix with values ranging from 2 to 10 b. Create and print a 88 matrix and fill it with a checkerboard pattern [[[01010101][01010101][1010101]] c. Get the unique values of a list i. List =[10,20,10,30,20,40,20,20,10,30,0,50,10] d. Get the values greater than 37 in the list i. List =[6,75,9,82,36,42,59,3,52,1,32,68,93,4,27,85,0,3,57] e. Convert the values of a list of values in Centigrade into Fahrenheit degrees i. List =[0,12,45.21,34,99.91] 2. Given the following two matrices, output the results of the operations with NumPy: A=147258369B=322169417 a. A+B b. AXB c. Determinate of A d. Inverse of B e. Eigenvalues of A 3. In Pandas, parse the file "weather_data.txt" and output the answers to the following: a. What day(s) had the highest actual precipitation? b. What was the average actual max temp for July 2014? c. What days was the actual max temp the record max temp? d. How much did it rain in October 2014? e. What day(s), if any, was the actual low temperature below 60 degrees and actual max temperature above 90 degrees on the same day? 4. In Pandas, parse the file "weather_data.txt" and create the following plots (with titles, labels and a legend): a. Actual max temperature and actual min temperature on the same line chart (max should be a red line, min should be blue) b. A histogram of actual precipitationStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started