import pandas as pd标签:df,tt,dfs,glob,ff,csv,dfs0tocsv From: https://www.cnblogs.com/chenyun-delft3d/p/17239036.html
import mikeio
import glob
import re
mainpath = r'E:\zj_ocean_ds\aj_bc_wt2'
ff = glob.glob(mainpath + r'\*.dfs0')
ty = []
df1 = pd.DataFrame()
n = 0
f = ff[3]
for f in ff:
tt = re.findall(r'TS_\d*', f)[0]
dfs = mikeio.read(f)
df = dfs.to_dataframe()
a = df['Zeros']
df1[tt] = a
df1.to_csv('bianjie.csv')