Import Pandas, import data, and Check the head of 10 lines of the DataFrame. in python i'm trying to make my code look like the image on the left where a small portion of the data is pulled up but I don't know the right code

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Import Pandas, import data, and Check the head of 10 lines of the DataFrame.

in python i'm trying to make my code look like the image on the left where a small portion of the data is pulled up but I don't know the right code 

In_class_project_8 - Jupyter Notel X
← → с Ⓒ localhost:8888/notebooks/Downloads/In_class_project_8.ip... ☆ ES 0
Jupyter In_class_project_8
File
+
Edit View
2 B
Insert Cell
pwd
DOOR
+
In [2] import pandas as pd
import numpy as np
import os
Run
In [3]:
Out [3]: 'C:\\Users\\morob\\Downloads'
Kernel
с
In [34]: df = pd. read_csv('Salaries.csv')
gs, **kwargs)
Widgets Help
205 if lon/aras)
Code
Trusted
In [36]: from numpy.random import randn
np.random.seed (101)
In [38]: df = pd. read_csv (randn(5, 4), row = ['A', 'B', 'C', 'D', 'E'], columns
TypeError
last)
Input In [38], in <cell line: 1>()
----> 1 df = pd. read_csv(randn(5, 4), row = ['A', 'B', 'C', 'D',
'E' columns '['W','X', 'Y', 'Z'] )
■
num allow anac
Logout
File ~\anaconda3\lib\site-packages\pandas\util\_decorators.py:311, in
deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*ar
Python 3 (ipykernel) O
Traceback (most recent call
x
:
Bb Upload Assignment: X E12_28_22-Jupyter N X Bb Pandas project 1
localhost:8888/notebooks/Downloads/12_28_22.ipynb
Jupyter 12_28_22 (autosaved)
File
+
Edit View Insert Cell Kernel
←
In [13]: from numpy.random import randn
np.random.seed (101)
In [15]: df
Out [15]:
↑ ↓ ▶ Run
с
9 trading higherSEK 10.3374 +0.0159 +0.1540%Positive 9:08 PM UTC
Out [17].
W
X
In [16]: df['w']
Out [16]: A
2.706850
B
0.651118
с
-2.018168
D
0.188695
E
0.190794
Name: W, dtype: float64.
In [17]: df[['W', 'Z']]
Widgets
Y
Code
In [14]: df = pd.DataFrame (randn(5, 4), index = ['A', 'B', 'C', 'D', 'E'], columns = ['W'
A 2.706850 0.628133 0.907969 0.503826
B 0.651118 -0.319318 -0.848077 0.605965
C -2.018168 0.740122 0.528813 -0.589001
D 0.188695 -0.758872 -0.933237 0.955057
E 0.190794 1.978757 2.605967 0.683509
Help
Z
+
V
Not Trusted
☆ EJ0
Logout
Python 3 (ipykernel) O
:
7:00 DUA
Transcribed Image Text:In_class_project_8 - Jupyter Notel X ← → с Ⓒ localhost:8888/notebooks/Downloads/In_class_project_8.ip... ☆ ES 0 Jupyter In_class_project_8 File + Edit View 2 B Insert Cell pwd DOOR + In [2] import pandas as pd import numpy as np import os Run In [3]: Out [3]: 'C:\\Users\\morob\\Downloads' Kernel с In [34]: df = pd. read_csv('Salaries.csv') gs, **kwargs) Widgets Help 205 if lon/aras) Code Trusted In [36]: from numpy.random import randn np.random.seed (101) In [38]: df = pd. read_csv (randn(5, 4), row = ['A', 'B', 'C', 'D', 'E'], columns TypeError last) Input In [38], in <cell line: 1>() ----> 1 df = pd. read_csv(randn(5, 4), row = ['A', 'B', 'C', 'D', 'E' columns '['W','X', 'Y', 'Z'] ) ■ num allow anac Logout File ~\anaconda3\lib\site-packages\pandas\util\_decorators.py:311, in deprecate_nonkeyword_arguments.<locals>.decorate.<locals>.wrapper(*ar Python 3 (ipykernel) O Traceback (most recent call x : Bb Upload Assignment: X E12_28_22-Jupyter N X Bb Pandas project 1 localhost:8888/notebooks/Downloads/12_28_22.ipynb Jupyter 12_28_22 (autosaved) File + Edit View Insert Cell Kernel ← In [13]: from numpy.random import randn np.random.seed (101) In [15]: df Out [15]: ↑ ↓ ▶ Run с 9 trading higherSEK 10.3374 +0.0159 +0.1540%Positive 9:08 PM UTC Out [17]. W X In [16]: df['w'] Out [16]: A 2.706850 B 0.651118 с -2.018168 D 0.188695 E 0.190794 Name: W, dtype: float64. In [17]: df[['W', 'Z']] Widgets Y Code In [14]: df = pd.DataFrame (randn(5, 4), index = ['A', 'B', 'C', 'D', 'E'], columns = ['W' A 2.706850 0.628133 0.907969 0.503826 B 0.651118 -0.319318 -0.848077 0.605965 C -2.018168 0.740122 0.528813 -0.589001 D 0.188695 -0.758872 -0.933237 0.955057 E 0.190794 1.978757 2.605967 0.683509 Help Z + V Not Trusted ☆ EJ0 Logout Python 3 (ipykernel) O : 7:00 DUA
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In [ ]:
In this in-class project, you need to do some simple analysis on San Francisco salary.
Import Pandas, import data, and Check the head of 10 lines of the DataFrame.
What is the average BasePay?
What is the highest amount of OvertimePay in the dataset ?
Transcribed Image Text:In [ ]: In [ ]: In [ ]: In [ ]: In [ ]: In this in-class project, you need to do some simple analysis on San Francisco salary. Import Pandas, import data, and Check the head of 10 lines of the DataFrame. What is the average BasePay? What is the highest amount of OvertimePay in the dataset ?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Unreferenced Objects
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education