Question: Python Program- Write a python program for Map and Reduce to find minimum temperature. Please help I have been given python code to find maximum

Python Program-

Write a python program for Map and Reduce to find minimum temperature. Please help

I have been given python code to find maximum temperature for Map and Reduce for reference

Python Program- Write a python program for Map and Reduce to find

Example 2-9. Map function for maximum temperature in Python lusbin/env python import re import sys dinl or line in svs.st val ine strip (year, temp, q) (val[15:19], val[87:92], val[92:93]) (templ "+9999" and re.match("[01459]", q) print "%sues," % (year, temp) Example 2-10. Reduce function for maximum temperature in Python !/usr/bin/env python import sys (last key, maxval) (None, 0) for line in sys.stdin: (key, val)- linestrip().split"It") f last_key and last_key F key: print "%sW2S" % (last-key, max.xal) (last key, max.val)(key, int(val)) else: (last key, maxval)(key, max(max.val, int(val))) if last_key: print "%st%s" % (last-key, maxwal) Example 2-9. Map function for maximum temperature in Python lusbin/env python import re import sys dinl or line in svs.st val ine strip (year, temp, q) (val[15:19], val[87:92], val[92:93]) (templ "+9999" and re.match("[01459]", q) print "%sues," % (year, temp) Example 2-10. Reduce function for maximum temperature in Python !/usr/bin/env python import sys (last key, maxval) (None, 0) for line in sys.stdin: (key, val)- linestrip().split"It") f last_key and last_key F key: print "%sW2S" % (last-key, max.xal) (last key, max.val)(key, int(val)) else: (last key, maxval)(key, max(max.val, int(val))) if last_key: print "%st%s" % (last-key, maxwal)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!