File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -588,17 +588,21 @@ def apportion_kriged_values(
588
588
unaged_sexed_apportioned = unaged_proportions .merge (aged_unaged_sex_proportions )
589
589
# ---- Set index to stratum column
590
590
unaged_sexed_apportioned .set_index ([stratum_col ], inplace = True )
591
+ # ---- Set the index based on `summed_abundance`
592
+ summed_abundance_indexed = summed_abundance .reindex (unaged_sexed_apportioned .index )
591
593
# ---- Append the stratum-aggregated abundance values
592
594
unaged_sexed_apportioned ["abundance_apportioned_unaged" ] = (
593
595
unaged_sexed_apportioned ["weight_proportion" ]
594
596
* unaged_sexed_apportioned ["weight_proportion_overall_unaged" ]
595
- * summed_abundance
597
+ * summed_abundance_indexed
596
598
)
599
+ # ---- Set the index based on `summed_biomass`
600
+ summed_biomass_indexed = summed_biomass .reindex (unaged_sexed_apportioned .index )
597
601
# ---- Append the stratum-aggregated biomass values
598
602
unaged_sexed_apportioned ["biomass_apportioned_unaged" ] = (
599
603
unaged_sexed_apportioned ["weight_proportion" ]
600
604
* unaged_sexed_apportioned ["weight_proportion_overall_unaged" ]
601
- * summed_biomass
605
+ * summed_biomass_indexed
602
606
)
603
607
604
608
# Distribute biological values over the overall proportions (i.e. relative to aged and unaged
You can’t perform that action at this time.
0 commit comments