Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
from import StringIndexer, OneHotEncoderEstimator
# create object of StringIndexer class and specify input and output column
SI_batsman = StringIndexer(inputCol='Batsman_Name',outputCol='Batsman_Index')
SI_bowler = StringIndexer(inputCol='Bowler_Name',outputCol='Bowler_Index')
# transform the data
my_data =
my_data =
# view the transformed data'Batsman_Name', 'Batsman_Index', 'Bowler_Name', 'Bowler_Index').show(10)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.