#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()
If you have any doubts please comment and please don't dislike,
Exercise 2: Summarize the data Get some quick stats with the describe() method. - In [6]:...
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 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,...