0

So I have a Series with stock tickers as the index and their industry as the value in the column. The industries are often repeated and what I have been trying to do is return a dataframe or series where the industries are repeated/duplicated.

               2000-01-27
 AMAT          Semiconductors
 AMD           Semiconductors
 ANDW-200712   Telecommunications
 CMVT-201302   Telecommunications
 CSCO          Telecommunications
 DTE           Electric

So for this example I want to return 3 seperate series/dataframes(because of the 3 unique industries), and one for example will contain AMAT and AMD because they are both semiconductors etc etc. However I cannot think of a way around this. I have tried using .duplicated() nd other various built in pandas functions but cannot think of a solution so if anyone can help it would be much appreciated.

ro_quant
  • 11
  • 3

0 Answers0