Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ind
- 0 ['C']
- 1 ['C']
- 2 ['C']
- 3 ['C']
- 4 ['E']
- 5 ['E']
- from itertools import chain
- df = pd.DataFrame({'ind': [['C'], ['C'], ['C'], ['C'], ['E'], ['E']]})
- res = ''.join(list(chain.from_iterable(df['ind'].values)))
- print(res)
- CCCCEE
Add Comment
Please, Sign In to add comment