Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMazin1 committed Mar 30, 2024
1 parent 0e76e72 commit e71d91a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Calc SD.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import numpy as np
import pandas as pd

data = pd.read_csv('/Users/benmazin/Code Dev/RP 4/netlogo results/results.csv')

# calculate the standard deviation
std_dev1 = np.std(data['ChemoTotalDead'].dropna())
std_dev2 = np.std(data['NoChemoTotalDead'].dropna())
std_dev3 = np.std(data['ChemoPercentInfect'].dropna())
std_dev4 = np.std(data['NoChemoPercentInfect'].dropna())

# create a DataFrame to store the results
result = pd.DataFrame({'ChemoTotalDead_std_dev': [std_dev1],
'NoChemoTotalDead_std_dev': [std_dev2],
'ChemoPercentInfect_std_dev': [std_dev3],
'NoChemoPercentInfect_std_dev': [std_dev4]})

# save the DataFrame as a CSV file
result.to_csv('/Users/benmazin/Code Dev/RP 4/netlogo results/std_dev_results.csv', index=False)

0 comments on commit e71d91a

Please sign in to comment.