Skip to content

Instantly share code, notes, and snippets.

@PranjalDureja0002
Created March 15, 2021 09:40
Show Gist options
  • Save PranjalDureja0002/dcb4fedb36068039ad84294744a4451e to your computer and use it in GitHub Desktop.
Save PranjalDureja0002/dcb4fedb36068039ad84294744a4451e to your computer and use it in GitHub Desktop.
fe
att_physician_count = patient_data['AttendingPhysician'].value_counts().to_dict()
patient_data['attend_physician_count']=patient_data['AttendingPhysician'].map(att_physician_count)
oper_physician_count = patient_data['OperatingPhysician'].value_counts().to_dict()
patient_data['operate_physician_count']=patient_data['OperatingPhysician'].map(oper_physician_count)
ben_count = patient_data['BeneID'].value_counts().to_dict()
patient_data['BeneID_count']=patient_data['BeneID'].map(ben_count)
prov_count = patient_data['Provider'].value_counts().to_dict()
patient_data['provider_count']=patient_data['Provider'].map(prov_count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment