数据:
#!usr/bin/env python # -*- coding:utf-8 -*- """ @author: Suyue @file: raincontent.py @time: 2024/05/23 @desc: """ import numpy as np import pandas as pd import xlwt import math df1 = pd.read_excel('20240510五原数浓度.xls') pi = math.pi p = 1 N = df1['数浓度'] d = df1['粒径'] # 计算粒径的3次方 d_3 = pow(d,3) delta_d = df1['变化直径'] # 计算雨水含量 D = N*d_3*delta_d df2 = pd.DataFrame(D) D_sum = df2.sum() W = (pi*p*D_sum)/(6000) print(W) # df2.to_excel(r'result.xlsx',index=False)
标签:python,含量,sum,df1,雨水,pd,import,pi From: https://www.cnblogs.com/shirleysu90/p/18209025