i GOT this ERROR when doing sampling stratify of a sample dataframe code is like this :
df = pd.DataFrame(dict(
A=['a', 'a', 'a', 'b', 'c', 'c', 'c', 'a', 'b', 'b', 'b', 'c', 'a', 'a', 'b', 'b', 'b', 'c', 'c', 'c'],
B=range(20)
))
df.sample(n=100, weights='A',replace=True)
it gives me this error:
TypeError: '<' not supported between instances of 'str' and 'int'
anyone can help?