HomeCHAPTER CLASS 12 Python Pandas - 2 Class 12 Sumita Arora Type C Solution 2 Comments Facebook Twitter Python Pandas - 2 || Type C || Class 12 || Sumita Arora || SolutionQ1. Write a program to print a DataFrame one column at a time and print only first three columns.Q2. Write a program to print a DataFrame one row at a time and print only first five rows.Q3. Write a program that performs count, sum, max, and min functions: (i) On rows(ii) On columnsQ4. Take a DataFrame of your choice. Write a program to calculate count of value only in a selective column.Q5. Give two identical dataframes Sales16 and Sales17. But Sales17 has some values missing. Write code so that Sales17 fills its missing values from the corresponding entries of Sales16.Q6. Write code that just produces single True/False as result for the presence of missing values in whole dataframe namely df.Q7. Write code to get summary details about a dataframe object for all its columns including numeric and string columns.Q8. Four Series objects Temp1, Temp2, Temp3 and Temp4 store the temperatures of week1, week2, week3 and week4 respectively. Create a dataframe from these four series objects where the indexes should be "Sunday', ‘Monday’...…, "Saturday', and columns should be 'Week1', 'Week2', 'Week3' and 'Week4'.Q9. From the dataframe object created in previous question, write a script to calculate :(a) Average temperatures for each day of the week i.e., average temperature for Mondays, Tuesdays and so on.(b) Average temperature per week.(c) Average temperature of whole month.Q10. Given three dataframes namely Sales18, Sales19 and Sales20 storing quarter wise sales of items ‘Beverages', 'Milk', 'Snack items', 'Icecreams' and 'Bakery items'.Write a script that prints the following:(i) Maximum yearly sales item-wise.(ii) Maximum Quarterly sale for an item across three years (e.g., Snack items' had maximum sales in Quarter 3 of year 2019).(iii) Average sales Quarter wise for all items year wise.(iv) Average sales Quarter wise for all items for all years.Q11. Given a dataframe that stores the details of past 25 years' monthly sales. Some old data is however missing. Write a script to calculate average: * Monthly sales across years* Yearly salesMake sure that missing values do not hamper the overall result.Q12. Dataframe Det1 stores details about a state such as TaxCollection. Dabts, Surplus, Int_rate for its district D1, D2, D4, D7, Dataframe Det2 also stores details of districts D1, D2, D5, D6, D7 details as PerCapita, Income, Population, Unemployment.Write a script that merges the details from two dataframes district-wise and then calculate the average working Income as AvgIncome / (Population-UnEmployment). Make sure to handle missing data average efficiently.Q13. Given two identical dataframes Sales16 and Sales17. But Sales17 has some values missing. Write code so that Sales17 fills its missing values from corresponding entries of Sales16.Q14. Write code that just produces single True/False as a result for the presence of missing values in whole dataframe namely df.Q15. A dataframe Stu stores details like 'Name', 'Class', 'Subject_Id' for 10 students and another dataframe Marks stores details like 'Subject_Id' and 'Avgmarks'. Write code so that two dataframes merge data on the basis of common Subject id.Q16. A dataframe Result stores the details as (Rollno., marks). Write a program to join it with a dataframe Stu storing details as (Name, Class, Subject). Make sure that all the rows from both the dataframes are part of the resultant dataframe.
actually these que. are not of type c so please update your site as soon as possible
ReplyDeletePlease tell me Question.
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )