赞
踩
df = pd.read_excel('data.xlsx', sheet_name='数据-玉米')
df = df.iloc[0:-1 ,0:-3]
col_name = df.columns.values.tolist()
county_id = df.loc[:, col_name[0]].astype('int')
production = df.fillna(0.00) # nan -> 0.00
production = round(production, 2)
- # matrix是numpy数组
- df = pd.DataFrame(matrix)
- df.to_excel("matrix.xlsx", index=False)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。