Assignments on Pandas
Use the Automobiles Dataset.
1) From given data set print first and last five rows
2) Print All Toyota Cars details (hint: use groupby function)
3) Count total cars per company (by using value_counts function)
4) Find each company’s Higesht price car. (hint: Groupby function and then apply .max
function)
5) Find the average mileage of each car making company (hint: Groupby function and then
apply .mean function)
6) Sort all cars by Price column (hint: using sort_values function).
7) Check for the null values for entire dataset.
8) Use Crime dataset.
I) find the aggregations like all moments of business decisions for all columns,value counts.
II) do the plottings like plottings like histogram, boxplot, scatterplot, barplot, piechart,dot
chart.
9) use mtcars dataset.
A) delete/ drop rows-10 to 15 of all columns
B)drop the VOL column
10) Use Bank Dataset.
A) change all the categorical columns into numerical by creating Dummies and using label
encoder.
B) rename all the column names in DF
C) Rename only one specific column in DF
D) After doing all the changes in bank dataset. save the file in your directory in Csv
Format.(hint: by using .to_csv)