Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

3. Get an idea of sources to which you may turn.

Answered: 1 week ago