Skip to content

Commit 8396473

Browse files
inference bugfix
1 parent cc115e0 commit 8396473

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

source/inference.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,10 +277,9 @@ starting at sample 0 and ending at sample 19,999.
277277

278278
Now that we have obtained the samples, we need to compute the
279279
proportion of entire home/apartment listings in each sample.
280-
We first `query` the observations with room type of "Entire home/apt";
281-
group the data by the `replicate` variable—to group the
282-
set of listings in each sample together—and then use `count`
283-
to compute the number of qualified observations in each sample; finally compute the proportion.
280+
We first group the data by the `replicate` variable—to group the
281+
set of listings in each sample together—and then use `value_counts`
282+
with `normalize=True` to compute the proportion in each sample.
284283
Both the first and last few entries of the resulting data frame are printed
285284
below to show that we end up with 20,000 point estimates, one for each of the 20,000 samples.
286285

0 commit comments

Comments
 (0)