df = pd.DataFrame([
['Africa', 'Egypt', 0, 0,155490,1,0.115],
['Africa', 'Kenya', 78182, 7,291210,1,0.45],
['Asia Pacific (excludes Greater China)', 'India', 667657, 1,0,-0.650],
['Asia Pacific (excludes Greater China)', 'Vietnam', 0, 0,0,0,0.005]
])
df.columns = ['Subregion', 'Market', 'Q4 2017', 'Rank_2017','Q4 2018','Rank_2018','year on Year Growth']
I just made up the data in actuality there are much more columns and rows but I Want to know how can I encode these Subregion and Market columns using one-hot encoding or any other way or method or library or work around anything that would do
@somebody
when you want to reply to a comment, otherwise the other person is not notified. $\endgroup$