I have data in two different data frames:
First data frame, where binned
is a pd.Interval
:
zip binned bin_count
0 07302 (325000.0, 662500.0] 6
1 07302 (662500.0, 1000000.0] 14
2 07302 (1000000.0, 1337500.0] 2
3 07302 (1337500.0, 1675000.0] 3
4 07302 (1675000.0, 2012500.0] 3
5 07302 (2012500.0, 2350000.0] 2
Second data frame:
zip listing_close_price price_interest
0 07302 730000.0 0.047237
1 07302 1650000.0 1.000000
2 07302 509000.0 0.032936
3 07302 685000.0 0.044325
4 07302 660000.0 1.000000
Such that my first data frame will have an extra column, because in my second data frame rows 0
and 1
both fall in first data frame index 0
= .07
.
Final data frame:
zip binned bin_count total_price_interest
0 07302 (325000.0, 662500.0] 6 .07
1 07302 (662500.0, 1000000.0] 14
2 07302 (1000000.0, 1337500.0] 2
3 07302 (1337500.0, 1675000.0] 3 .1
4 07302 (1675000.0, 2012500.0] 3
5 07302 (2012500.0, 2350000.0] 2
Thanks in advance!
Unfortunately, I've been going in circles and am unclear about where to start.