Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Iterator
#1
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
Reply


Messages In This Thread
Iterator - by RL_Python - Jan-24-2018, 03:00 AM
RE: Iterator - by j.crater - Jan-24-2018, 07:16 AM
RE: Iterator - by league55 - Jan-24-2018, 10:57 AM
RE: Iterator - by RL_Python - Jan-25-2018, 03:17 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020