Answered step by step
Verified Expert Solution
Question
1 Approved Answer
need help with no. 6 1. Import week3data.csv file into a list named w3data. Verify that data has been loaded and w3data is a list.
need help with no. 6
1. Import week3data.csv file into a list named w3data. Verify that data has been loaded and w3data is a list. 2. Create two blank list named w3greater300 and w3lesseq300. 3. Load all the items from w3data that are greater than 300 into w3greater300. 4. Load all the items from w3data that are less than equal to 300 into w3lesseq 300 . 5. Print the lists w3greater 300 and w3lesseq 300. 6. Print the number items in each of the 3 lists. V import pandas as pd w3data1 = list ( pd.read_csv("week3data.csv")) w3data =[] for x in w3data1: w3data.append ( int (x)) H w3greater 300=[] w3lesseq300 =[] for x in w3data: if x>300: w3greater 300. append (x) else: w3lesseq300. append (x) print(w3greater 300) print(w3lesseq300) [976,670,709,951,693,965,838,776,442,931,728,645,884,642,313,384,527,306,853,924] [111,300,45,110,9,26,239,273,251]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