I'm a Python / Pandas beginner and currently work on some projects with the IPython notebook. I just ran into a little problem that I couldn't solve with my book or by googling, maybe because I'm not exactly sure what term or function to search for.
Let's say I have a DataFrame with a Row
Industry Category
Software/Industry Systems Software/Medical Systems Software/Payment Electronic Components Database Applications Online Communities Medical Equipment Mobile Phones
What I want is to create a new row that assigns the rows in "Industry Category" to a "Parent Category". In this example just "Software" and "Hardware".
Industry Category Parent Category
Software/Industry Systems Software Software/Medical Systems Software Software/Payment Software Electronic Components Hardware Database Applications Software Online Communities Software Medical Equipment Hardware Mobile Phones Hardware
Note: There are about 600 Industry Category items in my list and about 30 Categories I have to sort them into.
So it would be great if there's some option to do the job with a *.csv with two rows. On the left all "Industry Category" items and on the right the desired "Parent Category" I like to apply to the dataset.
Thanks!