Compare lists in one column to the first n elements of another column in Python Polars lazyframes, where n is dynamically determined from index
I'm trying to compare words present within sentences in one column, to the first n words in a wordlist (in another column), and return the words in the sentences that don't exist in that subset of the wordlist (to a new column). The "n" amount should be dynamically determined by the index of the sentence being currently compared. More specifically, n should be determined by the index position of the sentence divided by some scaling factor as follows: n = index/scaling_factor Rounded down to the nearest integer, so that it is a valid index position: n = math.floor(index/scaling_factor) In the e
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.