Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# create object and specify input and output column
OHE = OneHotEncoderEstimator(inputCols=['Batsman_Index', 'Bowler_Index'],outputCols=['Batsman_OHE', 'Bowler_OHE'])
# transform the data
my_data =
# view and transform the data'Batsman_Name', 'Batsman_Index', 'Batsman_OHE', 'Bowler_Name', 'Bowler_Index', 'Bowler_OHE').show(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment