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
ZanzabumX [31]
3 years ago
14

1.11 LAB: Data frames

Computers and Technology
1 answer:
grigory [225]3 years ago
4 0

To work with data frames in python, the pandas library ls very efficient. Therefore, the following lines of code will <em>load, subset and display the maximum value</em> of each column in the subset :

import pandas as pd

<em>#This</em><em> </em><em>imports</em><em> </em><em>the</em><em> </em><em>pandas</em><em> </em><em>dataframe</em><em> </em><em>and</em><em> </em><em>alias</em><em> </em><em>it</em><em> </em><em>as</em><em> </em><em>pd</em><em> </em>

df_cars = pd.DataFrame('Cars.csv')

<u>Subsetting the firsts UserNum row</u> :

Using the index location method, the first userNum row has a row index of 0.

df_subset = df.iloc[:0, :]

<em>#this</em><em> </em><em>selects</em><em> </em><em>only</em><em> </em><em>the</em><em> </em><em>first</em><em> </em><em>row</em><em> </em><em>and</em><em> </em><em>all</em><em> </em><em>the</em><em> </em><em>columns</em><em> </em>

<em>#first</em><em> </em><em>row</em><em> </em><em>of</em><em> </em><em> </em><em>df_cars</em><em> </em><em>dataframe</em><em> </em><em>has</em><em> </em><em>been</em><em> </em><em>assigned</em><em> </em><em>to</em><em> </em><em>another</em><em> </em><em>dataframe</em><em> </em><em>called</em><em> </em><em>the</em><em> </em><em>df_subset</em>

df_subset.max()

<em>#the</em><em> </em><em>max</em><em> </em><em>function</em><em> </em><em>returns</em><em> </em><em>the</em><em> </em><em>maximum</em><em> </em><em>value</em><em> </em><em>for</em><em> </em><em>each</em><em> </em><em>column</em><em> </em>

<em>Note</em><em> </em><em>:</em><em> </em><em>the</em><em> </em><em>cars.csv</em><em> </em><em>data</em><em> </em><em>wasn't</em><em> </em><em>provided</em><em>,</em><em> </em><em>However</em><em>,</em><em> </em><em>this</em><em> </em><em>is a</em><em> </em><em>run-through</em><em> </em><em>of</em><em> </em><em>how</em><em> </em><em>to</em><em> </em><em>get</em><em> </em><em>the</em><em> </em><em>required</em><em> </em><em>output</em><em>.</em><em> </em>

Learn more :brainly.com/question/16183131?referrer=searchResults

You might be interested in
Write a program that repeatedly shows the user a menu to select the shape form three main shapes or to print the shapes created
fomenos

Answer:

Explanation:

The following code is written in Python. It creates a program that keeps printing out a menu allowing the user to create shapes. These shapes are saved in an array called shapes. Once the user decides to exit, it prints all of the shapes in the array along with their total area. The output can be seen in the attached picture below. Due to technical difficulties, I have added the code as a txt file below.

3 0
3 years ago
To bundle links together in order to improve bandwidth availability and redundancy, what protocol is used
Daniel [21]

Answer:

Link Aggregation Control Protocol

Explanation:

Link Aggregation Control Protocol can be used to assist in the formation of port channel bundles of physical links.

Link Aggregation Control Protocol is an IEEE standard defined in IEEE 802.3ad. LACP lets devices send Link Aggregation Control Protocol Data Units (LACPDUs) to each other to establish a link aggregation connection.

8 0
3 years ago
How do i make the lines on a google sheets bar graph skinnier
expeople1 [14]
Go to chart settings, customize, then gridlines section. Thats the only way I know to change them. Please leave a thanks or brainliest, thanks!
8 0
4 years ago
The Quake, One of the first fully 3D games was released in the year? 1986 1996 1995​
kipiarov [429]
It was released in 1996
5 0
3 years ago
Which two settings must you configure when fortigate is being deployed as a root fortigate in a security fabric topology?
Goryan [66]

The two settings that one must configure when fortigate is being deployed as a root fortigate in a security fabric topology are:

  • Option A. Enables you to view the logical and physical topology of Security Fabric devices.
  • Option  C. Enables you to view the security ratings of FortiGate Security Fabric groups.

<h3>What is security fabric settings?</h3>

The term Security Fabric is known to be a tool that aids one or allows one's network to be able to automatically see and also dynamically isolate any kinds of affected devices.

Note that is one that can also partition network segments, update rules, and they can bring out new policies, and delete malware.

Hence, The two settings that one must configure when fortigate is being deployed as a root fortigate in a security fabric topology are:

  • Option A. Enables you to view the logical and physical topology of Security Fabric devices
  • Option  C. Enables you to view the security ratings of FortiGate Security Fabric groups.

See full question below

Which two Security Fabric features are on FortiManager? (Choose two.)

Select one or more:

A. Enables you to view the logical and physical topology of Security Fabric devices

B. Enables you to run security rating on FortiGate devices

C. Enables you to view the security ratings of FortiGate Security Fabric groups

D. Enables you to view and renew Security Fabric licenses for FortiGate devices

Learn more about security from

brainly.com/question/25720881

#SPJ1

8 0
2 years ago
Other questions:
  • Wireless attacks avoid the access points to limit detection. <br> a. True <br> b. False
    9·1 answer
  • A computer has the following parameters Operation Frequency Cycles Arithmetic/Logical instructions 65% 1 Register load operation
    11·1 answer
  • Considering the traffic problem, do you think Rod handled the situation well?
    15·1 answer
  • What is structured​ knowledge?
    10·1 answer
  • Create the tables and appropriate constraints based on the following ER diagram. Use appropriate data types. Note that the size
    7·1 answer
  • Why does everyone refer to dogs as being loyal
    11·2 answers
  • You have a small company and want to keep your costs low, but it is important your employees share data. Which network would pro
    5·2 answers
  • Write a program named Deviations.java that creates an array with the deviations from average of another array. The main() method
    8·1 answer
  • Each of these is a step in cEach of these is a step in conflict resolution: Evaluate solutions suggested. Define the problem. De
    7·1 answer
  • Question 1 (1 point)
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!