0

The documentation says: "Sample with or without replacement. Default = False." This is not clear to me. Can anybody explain me the difference between replace=True and replace=False

hoang tran
  • 3,918
  • 3
  • 19
  • 21
  • Thanks for the answer and the link to another question. While the link to another question is helpful and answered my question, I would not down voted my question as you did. This question is about pandas and the question you referred to is about numpy. If you have question about pandas, would you google with numpy keyword? please try to google with keyword pandas and see if you find a good answer, then please down vote this question. In short, I think this is NOT DUPLICATE – hoang tran Nov 18 '18 at 11:41
  • 1
    I didn't downvote your question. Nobody did. "sample with replacement" or "sample without replacement" are statistical terms and their meaning do not change from one package to another. Plus, pd.DataFrame.sample uses np.random.choice under the hood, and the replace parameter is just passed to np.random.choice. There is nothing specific to pandas here. – ayhan Nov 18 '18 at 11:49
  • 1
    @ayhan: My apology! I misunderstood it. Thanks again for your answer and your explanation! – hoang tran Nov 18 '18 at 11:54

0 Answers0