I want to remove the rows from the pandas dataframe, that contains the strings from a particular column whose length is greater than the desired length.
For example:
Input frame:
X Y
0 Hi how are you.
1 An apple
2 glass of water
3 I like to watch movie
Now, say I want to remove the rows which has the string of words with length greater than or equal to 4 from the dataframe.
The desired output frame must be:
X Y
1 An apple
2 glass of water
Row with value 0,3 in column 'X' is removed as the number of words in column 0 is 4 and column 3 is 5 respectively.