Closed
Description
This seems to be related to this issue and this merge. But currently DataFrame.sample does not allow Generator objects for random_state.
Rationale
As far as I can tell, the convention for numpy 1.21 random sampling, in their documentation is to create Generators using numpy.random.default_rng, so creating BitGenerators directly seems a little awkward.
Fix
This is a quick fix though because the generator has field to access the bit generator
from numpy.random import default_rng
rng = default_rng()
bit_generator = rng.bit_generator