I am new to using Pandas
dataframes but have used Spark's dataframes a lot. Consider the following dataframe.
Name Value Title
mickey 20 wonderland
donald 10 welcome to donald's castle
minnie 86 Minnie mouse clubhouse
I want to retain only those rows where the "Name" is contained within "Title" ignoring case. So, in this case, the filtered dataframe should look like
Name Value Title
donald 10 welcome to donald's castle
minnie 86 Minnie mouse clubhouse
The row with Name = mickey
was dropped.
In spark, I can create a dataframe df
and then say df.filter($'Title'.lower().contains($'Name'.lower()))
Is there a simple way of expressing that in Pandas dataframes?