Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Ready method to re-weight a data sample to be uniform in some variables (DataFrame columns)

Is there a ready method in python (e.g. sklearn) to re-weight a data sample to be uniform in some variables (DataFrame columns)?

For example, if I have a DataFrame, and two of the columns are features of a machine learning model, and I want to compute such weights that a weighted histogram of the features would be approximately uniform.

I can write it myself, but I was wondering if a ready method exists somewhere.

Thank you!

Comments