6 Answers
New AnswerIt's urgent...
4/12/2021 7:39:24 PM
Srijito Ghosh6 Answers
New AnswerIt would be easier if you provided some more details, do you have any code, or anything? Your brief message is cryptic
I put the data in a data frame, I still don't know what youre trying to do, but the code shows True if the value is less than the std in the stv column and it will show True if the value is less than the mean https://code.sololearn.com/cawQZk2GvO2f/?ref=app
Hey Steven thanks for your help but can it be done without a data frame? I mean just by using the numpy library without using pandas...😅😅😅
import numpy as np data = np.array([150000, 125000, 320000, 540000, 200000, 120000, 160000, 230000, 280000, 290000, 300000, 500000, 420000, 100000, 150000, 280000]) stv=np.std(data) me_an=np.mean(data) count=0 i=0 while i < len(data): i=i+1 if data[i] in range(stv, me_an): count = count + 1 print ((count/len(data))*100) #this's the code I wrote but it seems that it's not appropriate as per the question. Please help me identify the flaw...
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message