how to open csv file in python
import csv
with open('example.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
how to open csv file in python
import csv
with open('example.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
string in netcdf file python
import netCDF4
import numpy as np
str_out = netCDF4.stringtochar(np.array(['test'], 'S4'))
nc = netCDF4.Dataset('./test.nc', 'w', format='NETCDF4_CLASSIC')
nc.createDimension('lat', 1)
nc.createDimension('lon', 1)
nc.createDimension('nchar', 4)
lat = nc.createVariable('lat', 'f4', ('lat',))
lon = nc.createVariable('lon', 'f4', ('lon',))
place = nc.createVariable('place', 'S1', ('nchar'))
lat[:] = 17.002
lon[:] = -81.501
place[:] = str_out
nc.close()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us