1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
klasskru [66]
3 years ago
9

As the first step, load the dataset from airline-safety.csv by defining the load_data function below. Have this function return

the following (in order):
1. The entire data frame
2. Total number of rows
3. Total number of columns
def load_data():
# YOUR CODE HERE
df, num_rows, num_cols
Computers and Technology
1 answer:
Savatey [412]3 years ago
3 0

Answer:

import pandas as pd

def load_data():

df = pd.read_csv("airline-safety.csv')

num_rows = df.shape[0]

num_cols = df.shape[1]

return df, num_rows, num_cols

Explanation:

Using the pandas python package.

We import the package using the import keyword as pd and we call the pandas methods using the dot(.) notation

pd.read_csv reads the csv data into df variable.

To access the shape of the data which is returned as an array in the format[number of rows, number of columns]

That is ; a data frame with a shape value of [10, 10] has 10 rows and 10 columns.

To access the value of arrays we use square brackets. With values starting with an index of 0 and so on.

The row value is assigned to the variable num_rows and column value assigned to num_cols

You might be interested in
Jake is photographing his pet puppy. He wants to preview the image the camera will capture. What part of the camera that is insi
german

A. i think that is right

3 0
3 years ago
Read 2 more answers
Robert's got a quick hand
Alina [70]
verry
good
song
love
it
6 0
3 years ago
Read 2 more answers
Is the following statement true or false information literacy is a subset of health literacy
BARSIC [14]

the answer is false because information literacy is a whole other type. you don't need it for the structure of health literacy.                              

4 0
3 years ago
Which of the following is not one of the four methods for classifying the various instances of malware by using the primary trai
BlackZzzverrR [31]

Answer: Source

Explanation: The malware is the software persisting malicious approach to cause the damage/loss.The primary trait of the malware are infection,concealment,etc.

The concealment refer to the malware such as the Trojan horse, and other viruses that has only purpose to cause the malfunctioning in the system.The virus that get into the other software and then damage the system in known as the infectious malware .

The circulation is the transferring of the virus in the circular manner between the system for the damaging.Thus,the only trait that is not the part of the malware is source.

4 0
3 years ago
Which statement best describes the concept of usability?
nordsb [41]

Usability emphasizes utility over aesthetics  statement best describes the concept of usability.

B.  Usability emphasizes utility over aesthetics.

<u>Explanation:</u>

Usability mainly speaks about the utility of an item. There are many wastes created in home and work place and those are sometimes thrown without knowing that it can be re-used for another purpose.

It is always better to re-use the product without considering aesthetic aspects though aesthetic is equally important. We can make the old objects to create a new one.

There are many videos in the social media to make the old objects to be used as a sub-product to create a new object and sometimes it looks better than an old one.

4 0
4 years ago
Read 2 more answers
Other questions:
  • What benefit does internet have​
    11·1 answer
  • Question 1 (1 point)
    10·2 answers
  • The ability of services to grow or shrink based on need is called __________.
    14·1 answer
  • Implement the function:
    6·1 answer
  • How to write email abut new home your friend ​
    14·1 answer
  • 9.4 Code Practice: Your task is to determine whether each item in the array above is divisible
    14·1 answer
  • Enthusiasm codehs 7.6.4 Write a function called add_enthusiasm that takes a string and returns that string in all uppercase with
    15·1 answer
  • Convert the following denary numbers into binary using 8-bit register:
    6·1 answer
  • 2 red and 2 overlapping balls in the center are surrounded by a green, fuzzy, circular cloud with a white line running through i
    15·2 answers
  • A laptop can be kept on palm to work. [true/false) ​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!