Question

Exercise 2: Summarize the data Get some quick stats with the describe() method. - In [6]: # Your code here Out[6] salary yrs
describe only gives you stats for quantitative values. Lets find out how many observations we have for the rank and sex vari
0 0
Add a comment Improve this question Transcribed image text
Answer #1

#import the library
import pandas as pd

#read the csv file using pandas
df = pd.read_csv("Salaries.csv")

#summarise the data
df.describe()

#number of labels and observations in variable rank
df["rank"].value_counts()

#number of labels and observations in variable sex
df["sex"].value_counts()

Activities Firefox Web Browser Thu 07:02 2 Salaries - Jupyter Notebook - Mozilla Firefox Downloads/ Salaries - Jupyter Noteb

Activities Firefox Web Browser Thu 07:02 2 Salaries - Jupyter Notebook - Mozilla Firefox Downloads/ Salaries - Jupyter Noteb

If you have any doubts please comment and please don't dislike,

Add a comment
Know the answer?
Add Answer to:
Exercise 2: Summarize the data Get some quick stats with the describe() method. - In [6]:...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Exercise 3: Remove rows with missing data You need to use the dropna() method of a...

    Exercise 3: Remove rows with missing data You need to use the dropna() method of a dataframe. More info here: https:/pandas pydata organdas docs/stable/generated pandas.DataFrame dropna.html Drop all rows that have missing data in any of the columns. Assign the resulting dataframe to the variable salaries_nonull Print the .count() summary of the datatrame to confirm that you've removed missing data (the counts should be the same for all columns) In [10): # Your code here Out[10]: rank discipline yrs.since.phd yrs.service...

  • Lab Exercise #15 Assignment Overview This lab exercise provides practice with Pandas data analysis library. Data...

    Lab Exercise #15 Assignment Overview This lab exercise provides practice with Pandas data analysis library. Data Files We provide three comma-separated-value file, scores.csv , college_scorecard.csv, and mpg.csv. The first file is list of a few students and their exam grades. The second file includes data from 1996 through 2016 for all undergraduate degree-granting institutions of higher education. The data about the institution will help the students to make decision about the institution for their higher education such as student completion,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT