Hi i have a dataset section1 csv and need to create the dataset with below columns RegistrationNo Name Date1 Date2 Date3 DateN

0 votes
I am new to Python AI - ML and trying to new dataset from the csv file, could anyone please help on the below question that would be great
Thanks in Advance
I have the below dataset
["Sno", "Department", "Branch", "Semester", "Course", "RegistrationNo", "StudentName", "Date", "Slot group", "Time", "ClassConducted", "ClassAttended"].
need to create the data frame where Date column to need to displayed as seperate columns along with RegistratioNo, Name
[RegistrationNo, Name, Date1, Date2, Date3, …. DateN]
Sep 29, 2020 in Python by Ramya
• 120 points

edited Sep 29, 2020 by Ramya 872 views

Hi, @Ramya,

Could you please post your dataset? And kindly clarify what exactly are you trying to create with the dataset?

Hi @Gitika

Thanks for your immediate response

Please find the below csv data

EDU University wants to find out, whether class attendance by the students should be made compulsory.  For that, they gave you a dataset, SECTION1.csv  which includes the following attributes in the same order.
 

["Sno", "Department", "Branch", "Semester", "Course", "RegistrationNo", "StudentName", "Date", "Slot group", "Time", "ClassConducted", "ClassAttended"].

But after looking into the data, you reached to a conclusion that it is not in a proper format for analysing.  

You need to manipulate the data and create a dataframe with the following attributes:  

[RegistrationNo, Name, Date1, Date2, Date3, …. DateN]
  • Each row corresponds to the data of a student. The column names of Date1, Date2, Date3.... DateN should be replaced with the unique dates from the dataset. Values under Date1Date2 … columns should be the total number of classes attended by the student on that date.

Data Set

Sno Department Branch Semester Course RegistrationNo StudentName Date Slot group Time ClassConducted ClassAttended
5 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 15/03/2019 2G-L48-2G-2G-L48-L48 04:00-04:50 2 1
19 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 12/03/2019 L30-6P3HR-6P4HR-6P3HR-B2-6P4HR-B2-B2-L30-L30 02:20-03:10 2 1
20 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 08/03/2019 12P4HR-12P4HR-TU10-L47-L47-TU10-L47-TU10 03:10-04:00 2 1
21 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 12/03/2019 A2-6P4HR-L29-L29-6P3HR-6P3HR-L29-A2-A2-6P4HR 01:30-02:20 2 1
25 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 15/03/2019 TU10-L47-L47-12P4HR-12P4HR-TU10-TU10-L47 03:10-04:00 2 1
52 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 08/03/2019 L48-L48-L48-2G-2G-2G 04:00-04:50 2 1
57 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 22/03/2019 TU10-L47-12P4HR-L47-TU10-12P4HR-TU10-L47 03:10-04:00 2 0
71 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 22/03/2019 2G-L48-2G-L48-2G-L48 04:00-04:50 2 0
77 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 26/03/2019 L29-6P3HR-A2-L29-A2-6P3HR-6P4HR-L29-A2-6P4HR 01:30-02:20 2 1
97 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 26/03/2019 6P4HR-L30-B2-B2-L30-L30-6P3HR-6P3HR-6P4HR-B2 02:20-03:10 2 1
111 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 12/02/2019 L29-A2-L29-6P3HR-6P4HR-L29-6P3HR-6P4HR-A2-A2 01:30-02:20 2 1
125 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 12/02/2019 6P3HR-L30-6P4HR-B2-6P3HR-6P4HR-B2-L30-B2-L30 02:20-03:10 2 1
129 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 15/02/2019 L47-L47-TU10-L47-12P4HR-12P4HR-TU10-TU10 03:10-04:00 2 1
147 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 15/02/2019 2G-2G-L48-L48-L48-2G 04:00-04:50 2 1
163 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 29/03/2019 TU10-L47-12P4HR-L47-L47-TU10-TU10-12P4HR 03:10-04:00 2 1
177 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 29/03/2019 L48-2G-2G-L48-2G-L48 04:00-04:50 2 1
199 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 02/04/2019 B2-B2-L30-6P4HR-L30-L30-6P3HR-B2-6P4HR-6P3HR 02:20-03:10 2 1
200 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101002 NISHCHHAL SHARMA 02/04/2019 A2-A2-L29-L29-6P3HR-6P4HR-L29-6P3HR-A2-6P4HR 01:30-02:20 2 1
205 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101005 NAMAN KAPOOR 15/02/2019 2G-2G-2G-L48-L48-L48 04:00-04:50 2 1
209 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101005 NAMAN KAPOOR 12/02/2019 L30-L30-6P3HR-6P4HR-B2-B2-6P4HR-6P3HR-B2-L30 02:20-03:10 2 0
227 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101005 NAMAN KAPOOR 15/02/2019 L47-TU10-L47-12P4HR-TU10-TU10-L47-12P4HR 03:10-04:00 2 1
234 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101005 NAMAN KAPOOR 29/03/2019 L47-TU10-12P4HR-TU10-L47-TU10-12P4HR-L47 03:10-04:00 2 1
235 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101005 NAMAN KAPOOR 12/02/2019 L29-6P3HR-6P4HR-A2-6P4HR-L29-A2-A2-L29-6P3HR 01:30-02:20 2 0
242 School of Computing Science & Engineering B.Tech/B.Tech (Hons) Computer Science Engineering Sem VI EMPS3012 16SCSE101005 NAMAN KAPOOR 29/03/2019 2G-L48-L48-2G-L48-2G 04:00-04:50 2 1

Hi@Ramya,

Just filter your DataFrame according to your requirement. For example, you want to sort your dataset according to the date. So on that case apply the filter for date first and create a new Dataframe. I mean just break your requirement into some steps. And you are able to perform your task.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP