Question
Hello, using Pyhton. I have a file with 8 columns, but I only need the first column (year) and the last one (tempearture). I have
Hello, using Pyhton.
I have a file with 8 columns, but I only need the first column (year) and the last one (tempearture).
I have calculate the average of the the last column and the standard deviation (numpy).
year, _ = line.split("-",maxsplit=1)
_ , _ , _ ,_ , _, _, _,temp= line.split(" ",maxsplit=8)
list_of_temp = []
list_of_temp.append(temp)
average=numpy.average(list_of_temp)
deviation=numpy.std(list_of_temp)
What I want is to calculate a trimmed average in a range between
(average - deviation , average + deviation) and from the average I found in the first place find the value(the temperature from the eighth column) that differ the most and print this value and the year that occurs.
Any help with the code?
Thank you very much!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started