I have dataframe with two columns. One column is ‘Exchange’ and the other is ‘StartToEnd’. I had the issue that each row in the exchange column would contain more than one exchange name. So like:
London Stock Exchange Berlin Stock Exchange
However python would read that as 1 string so I used str.split and it made each row into a list so now each row looks like:
['London Stock Exchange', 'Berlin Stock Exchange']
How could I split that one row into two individual rows but also duplicate the StartToEnd value for both new rows. So it would look like:
Exchange. StartToEnd
London Stock Exchange. 15.4
Berlin Stock Exchange. 15.4