x=
[[(some text,[a]), (some text,[b]), (some text,[c]).........]]
[[(some text,[d]), (some text,[e]), (some text,[f]).........]]
[[(some text,[g]), (some text,[h]), (some text,[k]).........]]
[[(some text,[i]), (some text,[x]), (some text,[y]).........]]
[[(some text,[z]), (some text,[t]), (some text,[w]).........]]
[[(some text,[t]), (some text,[g]), (some text,[u]).........]]
type(x)
pandas.core.series.Series
I want to create a series that only contains the values of the list within the tuple such as those[a]
or [u]
or [w]
.
How can I extract? Thank you.
UPDATE: I realized the way I phrase the question was confusing. I changed it now. It represents my problem better. Basically, I need to extract all [a]
or [u]
or [w]
row by row. This is tokenized text data, they are words in sentences. Sorry for the confusion.