For example, we can partition on the provider_city
and provider_state
variables to create a set of partitions, each containing the rows with a given unique combination of provider_city
and provider_state
. Our partitioned variable average_reimbursement_per_city
computes a mean of average_remibursement
across all rows in the partition and assigns that value to every row in the partition. So all records fromCHANDLER
, AZ
are assigned a computed average_reimbursement_per_city
value, all records from MESA
, AZ
are assigned a different computed average_reminbursement_per_city
value, and so on.