Knowee
Questions
Features
Study Tools

Write command to create a dataframe to store marks of 3 subjects . columns can be named as ["GE", "SEC","VAC "]. Rows are indexed by rollno of the students [25,30,50]

Question

Write command to create a dataframe to store marks of 3 subjects . columns can be named as ["GE", "SEC","VAC "]. Rows are indexed by rollno of the students [25,30,50]

🧐 Not the exact question you are looking for?Go ask a question

Solution

Sure, here is a Python command using pandas library to create a dataframe:

import pandas as pd

# Define data
data = {'GE': [None, None, None],
        'SEC': [None, None, None],
        'VAC': [None, None, None]}

# Define roll numbers as index
rollno = [25, 30, 50]

# Create DataFrame
df = pd.DataFrame(data, index=rollno)

print(df)

In this code, we first import the pandas library. Then, we define the data for our DataFrame. In this case, we're creating a DataFrame with 3 columns ("GE", "SEC", "VAC") and 3 rows (indexed by roll numbers 25, 30, 50). We're initializing all the marks as None. Finally, we print the DataFrame.

Please replace None with the actual marks of the students.

This problem has been solved

Similar Questions

Create a class called "Student" with private member variables for name, roll number, and marks in three subjects. Include public member functions to set the student details, calculate the average marks, and display the student detail

You are developing a Student Record Management System in C. The system needs to store and manage information for multiple students, including their names, roll numbers, and marks obtained in different subjects. Implement array in structures to read, write, and compute average marks and the students scoring above and below the average marks for a class of N students. INPUT/OUTPUT EXAMPLE: Enter the number of students: 3 Enter details for 3 students: Student 1: Name: A Roll Number: 1 Marks in 5 subjects: Subject 1: 12 Subject 2: 13 Subject 3: 14 Subject 4: 15 Subject 5: 16 Student 2: Name: BB Roll Number: 2 Marks in 5 subjects: Subject 1: 11 Subject 2: 13 Subject 3: 12 Subject 4: 15 Subject 5: 14 Student 3: Name: CC Roll Number: 10 Marks in 5 subjects: Subject 1: 13 Subject 2: 14 Subject 3: 16 Subject 4: 17 Subject 5: 11 Class average marks: 13.73 Students scoring above average: A (Roll Number: 1) CC (Roll Number: 10) Students scoring below average: BB (Roll Number: 2)

Write a C program using structure student which allows users to input details for three students including their names, roll numbers, and marks in 5 subjects. Use a function calculateTotalMarks(struct Student) which calculates the total marks and percentage for each student and displays the information. Each subject test is for 10 marks. Total marks = 50. Percentage = (marks obtained/total marks)*100.

DescriptionYou need to create a Constructor function which will create object for Student details of the following properties:name: It will store student nameroll_no: Stores the roll numberclass: Stores the classsection: Stores the sectionmarks_of_5_subjects: It will store marks of science, maths, social science, english & hindi. You can store marks in this format:{ science: 72, maths: 75, social_science: 79, english: 80, hindi: 67}printTop3Subjects: It is a function method. It will print top three subject names based on marks.printReportCard: It is also a function method. It will create and print a report card of a student. For example:+--------------------+| REPORT CARD |+--------------------+| Name - Huzaifa || Roll no. - 16 || Class - X || Section - A || Science - 73 || S.Sc - 79 || Maths - 75 || English - 80 | | Hindi - 67 || Prectage - 74.8 % |+--------------------+

Write Python code that ask the user to enter the number of students. After that ask the user to enter a mark for each student using a loop. Save all marks into an empty list using insert() method. Display all marks after finishing data entry.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.