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
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
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](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2ae76079-938b-4b5d-8ceb-1dfbc10f88ce%2F1a230504-e316-4735-a4f6-8bff8481d8f5%2Fynzciyo_processed.png&w=3840&q=75)
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 ?](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F2ae76079-938b-4b5d-8ceb-1dfbc10f88ce%2F1a230504-e316-4735-a4f6-8bff8481d8f5%2Fqtnafal_processed.png&w=3840&q=75)
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
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
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.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
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)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education