If you have Honeybee[+] installed then you can use
ladybug.epw.EPW class to do that. Here is a sample to change the temperature values for day 1 to 25 and save the file as a new file.
epw_file = r'PATH_TO_YOUR_FILE.epw'
epwf = EPW(epw_file)
epwf.dry_bulb_temperature.update_data_for_hours_of_year(values= * 24, hours_of_year=range(24))
You can calculate hour of year for any specific date using
DateTime class in
ladybug.dt module. There is also a Grasshopper component that comes with Ladybug[+] that does this. Keep in mind that hours in EPW are 1-24 and hours in ladybug are 0-23. So hour 24 of a day in epw file will be translated to hour 0 of the next day.