Answered step by step
Verified Expert Solution
Link Copied!

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],

image text in transcribed

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() method

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

Contemporary Issues In Database Design And Information Systems Development

Authors: Keng Siau

1st Edition

1599042894, 978-1599042893

More Books

Students also viewed these Databases questions

Question

What is the most important characteristic of a NOS?

Answered: 1 week ago