Sampling data such that distribution is preserved
Increase your sample size (n>>100). The data you are sampling from is itself a random sample. Creating a subset through random selection is itself a random process. If one of the data classes has a low frequency then the problem is that your sample size (100) is too low.
If you change the replace flag to 'True' and do repeated samples, you are doing something called bootstrapping. Assuming the complete data set represents the true population distribution this resampling will give you examples of what kind of measurements you might get for lower values of n (n=100).
The alternative is a stratification strategy as suggested by some above. However, you are not creating random subsets when you do this, and the assumption of distribution is now built into your smaller data sets. Note that you can only achieve this after having looked at the entire data set to determine its distribution. Probably not what you want.
If you are creating a (supervised) training data set from the data you can repeat under-represented data to manipulate the bias.
vsample_data = credit_card.sample(n=100, replace='False')
print(vsample_data)
Here, I was trying to sample 100 data points from a data set but not able to get correct sample data such that it preserves the original distribution of the credit card fraud data-set i.e Class-0( Non- Fraud) and Class-1(Fraud).