Advertisement
mayankjoin3

Roll Number CN CS358 Duplicate Remaining

Aug 22nd, 2023
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2. """
  3. Created on Tue Aug 22 17:24:08 2023
  4.  
  5. @author: Sanjit
  6. """
  7.  
  8. import pandas as pd
  9.  
  10. f = open('rolls.txt','r')
  11. lines = [line.strip() for line in f.readlines()]
  12.  
  13. df = pd.read_csv('CS359 2023 Batch 2 (Responses).csv')
  14.  
  15. studDF = df['Proj Partner 1'].append(df['Proj Partner 2'], ignore_index=False)
  16.  
  17. numApper = studDF.value_counts()
  18. extraApper = numApper[numApper>1]
  19. extraApper.to_csv('multiple_appear_student.csv')
  20.  
  21. misList = [line for line in lines if line not in studDF.values]
  22.  
  23. misDF = pd.DataFrame(misList)
  24. misDF.to_csv('list_of_stud_not_fill_yet.csv', index=False)
  25. with open("list_of_stud_not_fill_yet.txt","w") as f:
  26. f.writelines([row+'\n' for row in misList])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement