0

I have csv file, where I have list of trainings. Some of the trainings have 2 entry lines/rows. One is for on-spot participants and one is for ZOOM clients. I would like my code to go through all the rows and if first 4 symbols in 'Training' column are 'Zoom', then take value from that row and column 'Participants' and add it to previous row. Then delete that row where value was taken.

print(df.loc[df['Training'].str[:4] == 'Zoom'])

Current view and what I would like to get

Trixtr
  • 1
  • 1
    Hi! Your question should include your Pandas data in code form and the attempts you have made so far to solve your problem. Have a look at how to make a good reproducible Pandas example: https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples – w-m Sep 22 '21 at 10:23

0 Answers0