Say I have a dataframe in Pandas like the following:
> my_dataframe col1 col2 A foo B bar C something A foo A bar B foo
where rows represent instances, and columns input features (not showing the target label, but this would be for a classification task), i.e. I trying to build X out of
How can I vectorize this efficiently using e.g.
Do I need to convert each and every entry in my DataFrame to a dictionary first? (that's the way it is done in the example in the link above). Is there a more efficient way to do this?