Python-Project

Screenshot 2025-03-05 at 07 38 04Back to Welcome Page

Python Project

Advanced Operations

  1. Question: “Write the code to create a pivot table with ‘class’ as rows, ‘gender’ as columns, and ‘mark’ as values.”
  2. Question: “Write the code to create a new column ‘grade’ where marks >= 85 are ‘A’, 70-84 are ‘B’, 60-69 are ‘C’, and below 60 are ‘D’.”
  3. Question: “Write the code to sort the DataFrame by ‘mark’ in descending order.”

    Screenshot 2025-03-03 at 08 44 58

Data Manipulation

  1. Question: “Write the code to add a new column ‘passed’ that indicates whether the student passed (mark >= 60).”
  2. Question: “Write the code to rename the ‘mark’ column to ‘score’.”
  3. Question: “Write the code to drop the ‘passed’ column.”

Screenshot 2025-03-03 at 08 46 02

Data Mining

  1. Question: “Write the code to read a CSV file into a Pandas DataFrame.”
  2. Question: “Write the code to display the first 5 rows of the DataFrame.”
  3. Question: “Write the code to get the information about the DataFrame.”
  4. Question: “Write the code to get summary statistics for the DataFrame.”

    Screenshot 2025-03-03 at 08 47 30

Back to Welcome Page