Jan-24-2018, 03:00 AM
HI,
I am new at Python and learning how to code. I am stuck at solving a task given to me. i was able to solve some parts of the problem but got stuck with iterator and can not find any help online(or i didn't understand how to use iterator. I need to run the code below multiple times to create standard deviation plot. i need help on running the code and retrieving the information to be used to generate the plot.
Thank you in advance
Code:
import numpy as np
import pandas as pd
df = pd.read_csv('mosquitos_data.csv')
data = np.array(df.Response)
np.random.shuffle(data)
array_b = data[:25]
array_w = data[:18]
water = array_w.mean()
beer = array_b.mean()
a = water - beer
a
I am new at Python and learning how to code. I am stuck at solving a task given to me. i was able to solve some parts of the problem but got stuck with iterator and can not find any help online(or i didn't understand how to use iterator. I need to run the code below multiple times to create standard deviation plot. i need help on running the code and retrieving the information to be used to generate the plot.
Thank you in advance
Code:
import numpy as np
import pandas as pd
df = pd.read_csv('mosquitos_data.csv')
data = np.array(df.Response)
np.random.shuffle(data)
array_b = data[:25]
array_w = data[:18]
water = array_w.mean()
beer = array_b.mean()
a = water - beer
a