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
This uses the gps methodology to predict the likely location of an offender's base of operation:
iVinArrow [24]
Crime pattern analysis <span>uses the gps methodology to predict the likely location of an offender's base of operation.</span>
6 0
3 years ago
What is VoIP?
xeze [42]

Answer:

D. All of these are correct

Explanation:

VoIP transmits voice data packets over the internet. It is a low-cost option for receiving personal and business calls because it uses existing infrastructure that is the internet to transmit calls, unlike traditional telephone systems that require specialized equipment such as PBXs that are costly.VoIP also offers the ability to have more than one telephone number, as long as the bandwidth is enough, it allows multiple connections at any given time.

7 0
4 years ago
What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
jeka94

Answer:

it would be amhv i think i hope it answered u'er question

Explanation:

8 0
4 years ago
​the complete definition of a database, including descriptions of all fields, tables, and relationships, is called a _____.
SOVA2 [1]
A rational database is a one consisting of more than one table. It includes all fields of description and its relationships. 
7 0
4 years ago
A ________ is a computer or other electronic device connected to a network
Tanzania [10]
A _node_ is a computer or other electronic device connected to a network.

With the _mesh_ network topology, reliability is the major advantage while high cost is the disadvantage.
8 0
4 years ago
Other questions:
  • Which is the highest level of the hierarchy of needs model?
    7·2 answers
  • Invention I chose was radio.
    9·1 answer
  • Determine and prove whether an argument in English is valid or invalid. About Prove whether each argument is valid or invalid. F
    5·1 answer
  • Regarding computer protection, quarantining is defined as ________.
    9·1 answer
  • For the recursive method below, list the base case and the recursive statement, then show your work for solving a call to the re
    8·1 answer
  • Your _______ can help block inappropriate content online.<br> 1. web browser<br> 2. Password
    14·1 answer
  • The index used by the OS to manage computer files is called _____.
    13·2 answers
  • 1. Who was able to complete the puzzle the fastest in Trial 1?
    15·1 answer
  • We begin with a computer implemented in a single-cycle implementation. When the stages are split by functionality, the stages do
    13·1 answer
  • What is another term used for next generation firewalls
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!