hi, there is lots of answers in similar topic but i cant implement any of them in my situation. so please help me to find solution?
i have a list that contains sentences like:
mylist=(“updat review purchas towel”," spite mix review pictur damag “,“towel one reason low price point set towel “,“anoth slightli larger bath towel x standard “,”…”,”…”,”…") it has 20000 strings
and i want to search “reason” word in mylist and find index of it. in my example lets say it is (3,44,134). and then find value of my another lists which index is (3,44,134)
a was able to do it with saparete all my list and check with word by word into for loop. but i am sure there is a much more easy way.
actually i have much more bigger mylist. bu i didnt write it all of them because not confuse you. mylist size 20000x13 dataframe. so i can have (3,44,134) . i was able to do it by saparete all my list and check with word by word into for loop. but i am sure there is a much more easy way
How are you getting a three dimensional index from a two dimensional
matrix?
Your matrix is:
sentence
sentence
sentence
and each sentence is:
word word word word
so it takes two coordinates to specify the index of a word: which
sentence (the row), and which word in that sentence (the column).
So I don’t see how you are getting an index that needs THREE
coordinates: (3, 44, 134). It doesn’t matter how big the matrix is,
where is the third dimension coming from?
If you think there is an easier way, why don’t you show us the code you
are using and we might be able to suggest an improvement.