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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!