-
Notifications
You must be signed in to change notification settings - Fork 0
/
untitled.txt
38 lines (38 loc) · 2.91 KB
/
untitled.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
For this tasks You should use "Jupyter Notebook". Each task You can place in separate cell. Result file save as "result.ipynb".
Input data: "diamonds.csv"
Write a Pandas program to:
1. Read a csv file from a specified source and print the first 5 rows.
2. Read a dataset from diamonds DataFrame and modify the default columns values and print the first 6 rows.
3. Select a series from diamonds DataFrame. Print the content of the series.
4. Create a new 'Quality -color' Series (use bracket notation to define the Series name) of the diamonds DataFrame.
5. Find the number of rows and columns and data type of each column of diamonds Dataframe.
6. Rename two of the columns of the diamonds Dataframe.
7. Remove the second column of the diamonds Dataframe.
8. Summarize only 'price' columns of the diamonds Dataframe.
9. Sort the 'cut' Series in ascending order (returns a Series) of diamonds Dataframe.
10. Sort the 'price' Series in descending order (returns a Series) of diamonds Dataframe.
11. Filter the DataFrame rows to only show carat weight at least 0.3.
12. Convert a python list (any your list) to pandas series.
13. Find the details of the diamonds where length>5, width>5 and depth>5.
14. Find the diamonds that are either Premium or Ideal.
15. Display all column labels of diamonds DataFrame.
16. Iterate through diamonds DataFrame.
17. Drop all non-numeric columns from diamonds DataFrame.
18. Pass a list of data types to only describe certain types of diamonds DataFrame.
19. Calculate the mean and standart deviation of each numeric column of diamonds DataFrame.
20. Calculate the mean and standart deviation of each row of diamonds DataFrame.
21. Calculate count, minimum, maximum price for each cut of diamonds DataFrame.
22. Create a side-by-side bar plot of the diamonds DataFrame.
23. Display percentages of each value of cut series occurs in diamonds DataFrame.
24. Display the unique values in cut series of diamonds DataFrame.
25. Check the number of rows and columns and drop those row if 'any' values are missing in a row of diamonds DataFrame.
26. Drop a row if any or all values in a row are missing of diamonds DataFrame on two specific columns.
27. Set an existing column as the index of diamonds DataFrame.
28. Set an existing column as the index of diamonds DataFrame and restore the index name, and move the index back to a column.
29. Concatenate the diamonds DataFrame with the 'color' Series.
30. Read rows 0, 5, 7 and all columns of diamonds DataFrame.
31. Read rows 2 through 5 and all columns of diamonds DataFrame.
32. Read rows 0 through 2 (inclusive), columns 'color' through 'price' (inclusive) of diamonds DataFrame.
33. Read rows in which the 'cut' is 'Premium', column 'color' of diamonds DataFrame.
34. Read rows 2 through 5 (inclusive), columns in positions 0 through 2 (exclusive) of diamonds DataFrame.
35. Count the duplicate rows of diamonds DataFrame.