Home > Back-end >  How do I extract numbers from a dataframe column which follows a recurring pattern using pandas?
How do I extract numbers from a dataframe column which follows a recurring pattern using pandas?

Time:02-04

I am working on a dataframe which has a column that follows a pattern as shown in the image as The code from above in a Jupyter Notebook cell with output.

Essentially what I'm doing is getting the string of each student's marks, itemizing each character into an array, and getting the characters that correspond with the grade you're looking for. Then, I'm converting those to integers, appending them to new arrays containing all the scores for each respective class, and then adding those as new columns to the original studentsDF DataFrame.

  •  Tags:  
  • Related