Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

so i have a list of lists [[0,1,2.333],[0,2,2.333],[0,7.89,2.333],[1,4.3,2.333],[1,5.7,2.333],[1,4.2,2.333],[2,53.4,2.333],[3,5,2.333],[3,4.22,2.333],[4,3.4,2.333],[4,6.7,2.333],[5,3,2.333],[6,2.3,2.333]] for every item in the list that's first number is 0 i want to get the mean

so i have a list of lists

[[0,1,2.333],[0,2,2.333],[0,7.89,2.333],[1,4.3,2.333],[1,5.7,2.333],[1,4.2,2.333],[2,53.4,2.333],[3,5,2.333],[3,4.22,2.333],[4,3.4,2.333],[4,6.7,2.333],[5,3,2.333],[6,2.3,2.333]]

for every item in the list that's first number is 0 i want to get the mean of the second digit. so for all the lists that begin in 0 i need to add the second numbers(1,2,7.89), and divide it by the number of lists that begin in 0.

i want to do this with every beginning digit(0,1,2,3,4,5,6)

and put the averages of the second digit in a list.

how can i do this in python?

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

Data Management Databases And Organizations

Authors: Richard T. Watson

2nd Edition

0471180742, 978-0471180746

More Books

Students also viewed these Databases questions

Question

so i have a list of lists...

Answered: 1 week ago

Question

Recognize the power of service guarantees.

Answered: 1 week ago