First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!
1 | initial version |
Something like this does the job. After calling this function, write the following line: volviol.to_csv('voltage.csv')
and that should do it.
def voltages_csv():
# get a dataframe of all buses and their voltages; you need to write this function
allBusData = AllBuses()
volviol = []
for index, iBus in allBusData.iterrows():
busName = iBus['exname']
busArea = iBus['area']
busMag = iBus['kv']
busAng = iBus['angled']
busKv = iBus['base']
busPu = iBus['pu']
if not (0.95 <= busPu <= 1.05):
volviol.append(iBus)
volviolDF = pd.DataFrame(data=volviol)
return volviolDF
2 | No.2 Revision |
Something like this does the job. After calling this function, write the following line: volviol.to_csv('voltage.csv')
and that should do it.
def voltages_csv():
# get a dataframe of all buses and their voltages; you need to write this function
allBusData = AllBuses()
volviol = []
for index, iBus in allBusData.iterrows():
busName = iBus['exname']
busArea = iBus['area']
busMag = iBus['kv']
busAng = iBus['angled']
busKv = iBus['base']
busPu = iBus['pu']
if not (0.95 <= busPu <= 1.05):
volviol.append(iBus)
volviolDF = pd.DataFrame(data=volviol)
return volviolDF