0

I have selected multiple netCDF4 files from my folder.I need to convert selected variables from all such files to .csv format by looping.

Can you suggest me some ways to do such conversion I have created a dataframe and tried tio export using this conversion

d=np.dstack((dtime,lat,lon,alt,range_ku,model_dry_tropo_corr,rad_wet_tropo_corr,iono_corr_alt_ku,sea_state_bias_ku,mean_sea_surface,solid_earth_tide,pole_tide))
#print(d)
df=pd.DataFrame(d[0,:], columns = ['dtime','lat','lon','alt','range_ku','model_dry_tropo_corr','rad_wet_tropo_corr','iono_corr_alt_ku','sea_state_bias_ku','mean_sea_surface','solid_earth_tide','pole_tide'])
#print(df)
df.to_csv("F:/data/New folder/"+file1.split('\\')[1][:-3]+".csv")    
4

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.