MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
header = ['Latitude', 'Longitude'] with open('Output.csv', 'wb') as csvFile: outputwriter = csv.writer(csvFile, delimiter=',') for time_index, time in enumerate(times): # pull the dates out for the header t = num2date(time, units = units, calendar='365_day') header.append(t) outputwriter.writerow(header) for lat_index, lat in enumerate(lats): content = [lat] # first value in row lat #print lat_index for lon_index, lon in enumerate(lons): content.append(lon) # second value in row lon for time_index, time in enumerate(times): n = num2date(time, units = units, calendar='365_day') # debug purposes only print to console data = sfc[time_index,lat_index,lon_index] if data != "--": content.append(data) print "data at:", n, lat, lon print time_index,lat_index,lon_index print data
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|python 3 - creating csv files from python dictionary||9||147|
|Python multiple IF statements||4||112|
|Reading text file in Python gives strange results||7||108|
|How to send commands to switch via telnet programatically||15||85|
Join the community of 500,000 technology professionals and ask your questions.