Skip to content

Instantly share code, notes, and snippets.

@PranjalDureja0002
Created March 2, 2021 14:35
Show Gist options
  • Save PranjalDureja0002/309480ae8a33ddc32516819c02fe3478 to your computer and use it in GitHub Desktop.
Save PranjalDureja0002/309480ae8a33ddc32516819c02fe3478 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