Answered step by step
Verified Expert Solution
Question
1 Approved Answer
USING PYTHON data_dict = {'soda':['coke', 'diet coke', 'sprite', 'pepsi', 'mug', 'mt. dew'], 'cals': [140, 1, 90, 150, 130, 170], sodium':[45, 40, 65, 30, 65, 60],
USING PYTHON
data_dict = {'soda':['coke', 'diet coke', 'sprite', 'pepsi', 'mug', 'mt. dew'], 'cals': [140, 1, 90, 150, 130, 170], sodium':[45, 40, 65, 30, 65, 60], 'corp': ['coca cola', 'coca cola', 'coca cola', 'pepsico', 'pepsico', 'pepsico']} 3]: data = pd.DataFrame(data_dict) data 3]: O 1 2 3 soda cals coke 140 diet coke 1 sprite 90 pepsi 150 mug 130 mt. dew 170 sodium corp 45 coca cola 4 0 coca cola 65 coca cola 30 pepsico 65 pepsico 60 pepsico 5 B. Print a DataFrame containing only sodas with more than 10 calories. C. Print a DataFrame containing only sodas with more than 10 calories and less than 100 calories. D. Print a DataFrame containing only data for coke, pepsi, and mug. Use the isin() methodStep 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