Python Forum
Separating Names & Counting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Separating Names & Counting
#3
(Nov-03-2022, 07:32 AM)Larz60+ Wrote: Please show what you have tried, working or not.

import pandas as pd
import os
party = pd.read_csv('party.csv')
CountPeople=party['ATTENDEES'].str.split(pat = ',', expand = True)
CountPeople=CountPeople.groupby(0).count()
party
CountPeople
I've also included an attachment, so you can see the outputs.
Yoriz write Nov-03-2022, 12:47 PM:
Please post all code, output and errors (in their entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Attached Files

Thumbnail(s)
   

.csv   party.csv (Size: 105 bytes / Downloads: 62)
Reply


Messages In This Thread
Separating Names & Counting - by Steven5055 - Nov-03-2022, 06:00 AM
RE: Separating Names & Counting - by Larz60+ - Nov-03-2022, 07:32 AM
RE: Separating Names & Counting - by Steven5055 - Nov-03-2022, 08:20 AM
RE: Separating Names & Counting - by DeaD_EyE - Nov-03-2022, 10:08 AM
RE: Separating Names & Counting - by Steven5055 - Nov-04-2022, 04:36 AM
RE: Separating Names & Counting - by deanhystad - Nov-04-2022, 10:08 AM
RE: Separating Names & Counting - by Steven5055 - Nov-06-2022, 12:04 AM
RE: Separating Names & Counting - by deanhystad - Nov-06-2022, 12:52 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020