Get Adobe Flash player

pandas str contains case insensitive

You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. followed by a 0. If True, assumes the pat is a regular expression. Same as endswith, but tests the start of string. This will result in the following DataFrame: The simplest example is to check whether a DataFrame column contains a string literal. Example #1: Use Series.str.contains a () function to find if a pattern is present in the strings of the underlying data in the given series object. Ignoring case sensitivity using flags with regex. In this example, we are checking whether our classroom is present in the list of classrooms or not. expect only s2[1] and s2[3] to return True. Regular expressions are not accepted. Weapon damage assessment, or What hell have I unleashed? with False. Flags to pass through to the re module, e.g. re.IGNORECASE. A-143, 9th Floor, Sovereign Corporate Tower, We use cookies to ensure you have the best browsing experience on our website. Ensure pat is a not a literal pattern when regex is set to True. pandas.Series.str.endswith # Series.str.endswith(pat, na=None) [source] # Test if the end of each string element matches a pattern. The default depends Equivalent to str.endswith (). Given a string of words. What tool to use for the online analogue of "writing lecture notes on a blackboard"? the resultant dtype will be bool, otherwise, an object dtype. One way to carry out the preceding query in a case-insensitive way is to add a COLLATE NOCASE qualifier to the GROUP BY clause. In this, sub() of the regex is used to perform the task of replacement, and IGNORECASE ignores the cases and performs case-insensitive replacements. Find centralized, trusted content and collaborate around the technologies you use most. return True. seattle aquarium octopus eats shark; how to add object to object array in typescript; 10 examples of homographs with sentences; callippe preserve golf course Return boolean Series or Index based on whether a given pattern or regex is contained within a string of a Series or Index. Parameters patstr or tuple [str, ] Character sequence or tuple of strings. PTIJ Should we be afraid of Artificial Intelligence? # Using str.contains() method. Python Programming Foundation -Self Paced Course, Python Pandas - pandas.api.types.is_file_like() Function, Add a Pandas series to another Pandas series, Python | Pandas DatetimeIndex.inferred_freq, Python | Pandas str.join() to join string/list elements with passed delimiter. Method 1: Using re.IGNORECASE + re.escape () + re.sub () In this, sub () of the regex is used to perform the task of replacement, and IGNORECASE ignores the cases and performs case-insensitive replacements. pandas.NA is used. More useful is to get the count of occurrences matching the string Python. Does Python have a string 'contains' substring method? Python Programming Foundation -Self Paced Course, Python | Ways to sort list of strings in case-insensitive manner, Case-insensitive string comparison in Python, Python - Case insensitive string replacement, Python regex to find sequences of one upper case letter followed by lower case letters, Python - Convert Snake case to Pascal case, Python - Convert Snake Case String to Camel Case, Python program to convert camel case string to snake case, Python | Grouping list values into dictionary. These are the methods in Python for case-insensitive string comparison. Note in the following example one might expect only s2[1] and s2[3] to Specifying na to be False instead of NaN replaces NaN values Hosted by OVHcloud. Does Python have a ternary conditional operator? I have a very simple problem. Set it to False to do a case insensitive match. Is variance swap long volatility of volatility? Pandas Series.str.contains () function is used to test if pattern or regex is contained within a string of a Series or Index. The casefold() method works similar to lower() method. And then get back the string using join on the list. An online shopping application may contain a list of items in it so that the user can search the item from the list of items. We can use the boolean operators | and & to define character sequences to be checked for. Python - "case insensitive" in a string or "case ignore", The open-source game engine youve been waiting for: Godot (Ep. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Flags to pass through to the re module, e.g. How to update zeros with specific values in Pandas columns? All rights reserved. The default depends on dtype of the on dtype of the array. A Series of booleans indicating whether the given pattern matches Return boolean Series or Index based on whether a given pattern or regex is It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. In this example, the user string and each list item are converted into lowercase and then the comparison is made. Specifying na to be False instead of NaN replaces NaN values The task is to write a Python program to replace the given word irrespective of the case with the given string. However, .0 as a regex matches any character But every user might not know German, so casefold() method converts German letter to ss whereas we cannot convert German letter to ss by using lower() method. Well start by creating a simple DataFrame for this example. Like so: df.loc[df.words.str.contains('word',case=False)] A Computer Science portal for geeks. Enter search terms or a module, class or function name. It is true if the passed pattern is present in the string else False is returned.Example #2: Use Series.str.contains a () function to find if a pattern is present in the strings of the underlying data in the given series object. How do I do a case-insensitive string comparison? Index([False, False, False, True, nan], dtype='object'), Reindexing / Selection / Label manipulation. Not the answer you're looking for? Returning a Series of booleans using only a literal pattern. This work is licensed under a Creative Commons Attribution 4.0 International License. re.IGNORECASE. (ie., different cases) Example 1: Conversion to lower case for comparison If yes please edit your post to make this clear and add the "panda" tag, else explain what is this "df" thing. given pattern is contained within the string of each element If True, assumes the pat is a regular expression. Example - Returning a Series of booleans using only a literal pattern: Example - Returning an Index of booleans using only a literal pattern: Example - Specifying case sensitivity using case: Specifying na to be False instead of NaN replaces NaN values with False. A Series or Index of boolean values indicating whether the Follow us on Facebook Character sequence or regular expression. A Series or Index of boolean values indicating whether the Method #1 : Using next () + lambda + loop The combination of above 3 functions is used to solve this particular problem by the naive method. Python3 import re # initializing string test_str = "gfg is BeSt" # printing original string print("The original string is : " + str(test_str)) na : Fill value for missing values. A Computer Science portal for geeks. Character sequence or regular expression. regex : If True, assumes the pat is a regular expression.Returns : Series or Index of boolean values. In this example, the user string and each list item are converted into uppercase and then the comparison is made. Returns: Series or Index of boolean values Then it displays all the models of Lenovo laptops. Here, you can also use upper() in place of lower(). This article focuses on one such grouping by case insensitivity i.e grouping all strings which are same but have different cases. Note that str.contains() is a case sensitive, meaning that 'spark' (all in lowercase) and 'SPARK' are considered different strings. . with False. Let's discuss certain ways in which this can be performed. re.IGNORECASE. Ensure pat is a not a literal pattern when regex is set to True. In this Data Analysis tutorial well learn how to use Python to search for a specific or multiple strings in a Pandas DataFrame column. the resultant dtype will be bool, otherwise, an object dtype. Even if you don't pass in an argument for case you will still be defaulting to case=True. the end of each string element. match rows which digits - df['class'].str.contains('\d', regex=True) match rows case insensitive - df['class'].str.contains('bird', flags=re.IGNORECASE, regex=True) Note: Usage of regular expression might slow down the operation in magnitude for bigger DataFrames. For example, Our shopping application has a list of laptops it sells. Time Complexity: O(n), where n is the length of the input string.Auxiliary Space: O(1), Python Programming Foundation -Self Paced Course, Case-insensitive string comparison in Python, Python | Ways to sort list of strings in case-insensitive manner, Python - Case Insensitive Strings Grouping, Python - Convert Snake Case String to Camel Case, Python program to convert camel case string to snake case, Python regex to find sequences of one upper case letter followed by lower case letters, Python - Convert Snake case to Pascal case, Python - Random Replacement of Word in String. Test if pattern or regex is contained within a string of a Series or Index. Same as startswith, but tests the end of string. If you want to do the exact match and with strip the search on both sides with case ignore. Syntax: Series.str.contains (pat, case=True, flags=0, na=nan, regex=True) Parameter : df=df [df ['name'].str.contains ('ar',case=False)] Output. A-143, 9th Floor, Sovereign Corporate Tower, We use cookies to ensure you have the best browsing experience on our website. Python Programming Foundation -Self Paced Course, Python | Data Comparison and Selection in Pandas, Python | Find Hotel Prices using Hotel price comparison API, Comparison of Python with Other Programming Languages, Comparison between Lists and Array in Python, Python - Similar characters Strings comparison. Three different datasets, written to filenames with three different case sensitivities, results in only one file being produced. Method #2 : Using sorted() + groupby() This particular task can also be solved using the groupby function which offers a conventional method to solve this problem. Return boolean Series or Index based on whether a given pattern or regex is My code: and Twitter for latest update. La funcin devuelve una serie o un ndice booleano en funcin de si un patrn o una expresin regular determinados estn contenidos en una string de una serie o un ndice. The lambda function performs the task of finding like cases, and next function helps in forward iteration. return True. © 2023 pandas via NumFOCUS, Inc. A panda dataframe ? Returning an Index of booleans using only a literal pattern. If False, treats the pat as a literal string. One such case is if you want to perform a case-insensitive search and see if a string is contained in another string if we ignore . How to match a substring in a string, ignoring case. Returning house or dog when either expression occurs in a string. My Teams meeting link is not opening in app. A-143, 9th Floor, Sovereign Corporate Tower, We use cookies to ensure you have the best browsing experience on our website. Python Pandas: Get index of rows where column matches certain value. You can use str.extract: cars ['HP'] = cars ['Engine Information'].str.extract (r' (\d+)\s*hp\b', flags=re.I) Details (\d+)\s*hp\b - matches and captures into Group 1 one or more digits, then just matches 0 or more whitespaces ( \s*) and hp (in a case insensitive way due to flags=re.I) as a whole word (since \b marks a word boundary) Set it to False to do a case insensitive match. Return boolean Series or Index based on whether a given pattern or regex is contained within a string of a Series or Index. List contains many brands and one of them is Lenovo. Connect and share knowledge within a single location that is structured and easy to search. Parameters patstr Character sequence or regular expression. In this case we search for occurrences of Python or Haskell in our language Series. Case-insensitive grouping: COLLATE NOCASE. Hosted by OVHcloud. If False, treats the pat as a literal string. So case-insensitive search also returns false. Series.str.contains() method in pandas allows you to search a column for a specific substring. Is lock-free synchronization always superior to synchronization using locks? It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. Pandas is a library for Data analysis which provides separate methods to convert all values in a series to respective text cases. But sometimes the user may type lenovo in lowercase or LENOVO in upper case. The answers are all more complex regarding string compare, which I have no use for. Next: Series-str.count() function. Example - Returning house or fox when either expression occurs in a string: Example - Ignoring case sensitivity using flags with regex: Example - Returning any digit using regular expression: Ensure pat is a not a literal pattern when regex is set to True. To learn more, see our tips on writing great answers. naobject, default NaN Object shown if element tested is not a string. followed by a 0. How can I recognize one? Browse other questions tagged, Where developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide. Pandas Series.str.contains() function is used to test if pattern or regex is contained within a string of a Series or Index. Why is the article "the" used in "He invented THE slide rule"? Ensure pat is a not a literal pattern when regex is set to True. Character sequence or regular expression. A Computer Science portal for geeks. Returning an Index of booleans using only a literal pattern. Note in the following example one might expect only s2[1] and s2[3] to Flags to pass through to the re module, e.g. In this case well use the Series function isin() to check whether elements in a Python list are contained in our column: How to solve the AttributeError: Series object has no attribute strftime error? If you want to filter for both "word" and "Word", you must set case=False. Python pandas.core.strings.str_contains() Examples The following are 2 code examples of pandas.core.strings.str_contains() . In this example, the string is not present in the list. A Series or Index of boolean values indicating whether the Returning an Index of booleans using only a literal pattern. Syntax: Series.str.contains(pat, case=True, flags=0, na=nan, regex=True)Parameter :pat : Character sequence or regular expression. Case-insensitive means the string which you are comparing should exactly be the same as a string which is to be compared but both strings can be either in upper case or lower case. This will return all the rows. NaN values the resultant dtype will be bool, otherwise, an object dtype. Enter search terms or a module, class or function name. Regular expressions are not Check for Case insensitive strings In a similar fashion, we'll add the parameter Case=False to search for occurrences of the string literal, this time being case insensitive: hr_df ['language'].str.contains ('python', case=False).sum () Check is a substring exists in a column with Regex with False. If Series or Index does not contain NaN values If we want to buy a laptop of Lenovo brand we go to the search bar of shopping app and search for Lenovo. Analogous, but stricter, relying on re.match instead of re.search. flagsint, default 0 (no flags) Regex module flags, e.g. If Series or Index does not contain NaN values How do I commit case-sensitive only filename changes in Git? Method #1 : Using next() + lambda + loop The combination of above 3 functions is used to solve this particular problem by the naive method. Here is the code that works for lowercase and returns only "apple": I need this to find "apple", "APPLE", "Apple", etc. Expected Output. pandas.Series.str.contains pandas 1.5.2 documentation Getting started User Guide API reference Development Release notes 1.5.2 Input/output General functions Series pandas.Series pandas.Series.index pandas.Series.array pandas.Series.values pandas.Series.dtype pandas.Series.shape pandas.Series.nbytes pandas.Series.ndim pandas.Series.size How do I concatenate two lists in Python? Wouldn't this actually be str.lower().startswith() since the return type of str.lower() is still a string? It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions. A Computer Science portal for geeks. of the Series or Index. For StringDtype, pandas.NA is used. Series.str can be used to access the values of the series as strings and apply several methods to it. To check if a given string or a character exists in an another string or not in case insensitive manner i.e. re.IGNORECASE. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. given pattern is contained within the string of each element The str.contains () function is used to test if pattern or regex is contained within a string of a Series or Index. As we can see in the output, the Series.str.contains() function has returned a series object of boolean values. pandas.Series.str.match # Series.str.match(pat, case=True, flags=0, na=None) [source] # Determine if each string starts with a match of a regular expression. Example 3: Pandas match rows starting with text. If True, assumes the pat is a regular expression. We will use contains () to get only rows having ar in name column. Tests if string element contains a pattern. rev2023.3.1.43268. Series.str.contains has a case parameter that is True by default. In a nutshell we can easily check whether a string is contained in a pandas DataFrame column using the .str.contains() Series function: Read on for several examples of using this capability. If False, treats the pat as a literal string. accepted. This article focuses on one such grouping by case insensitivity i.e grouping all strings which are same but have different cases. But compared to lower() method it performs a strict string comparison by removing all case distinctions present in the string. What does a search warrant actually look like? Fix attributeerror dataframe object has no attribute errors in Pandas, Convert pandas timedeltas to seconds, minutes and hours. Returning a Series of booleans using only a literal pattern. return True. Making statements based on opinion; back them up with references or personal experience. If False, treats the pat as a literal string. Lets discuss certain ways in which this can be performed. acknowledge that you have read and understood our, Data Structure & Algorithm Classes (Live), Data Structure & Algorithm-Self Paced(C++/JAVA), Android App Development with Kotlin(Live), Full Stack Development with React & Node JS(Live), GATE CS Original Papers and Official Keys, ISRO CS Original Papers and Official Keys, ISRO CS Syllabus for Scientist/Engineer Exam, Case-insensitive string comparison in Python, How to handle Frames/iFrames in Selenium with Python, Python Filter Tuples Product greater than K, Python Row with Minimum difference in extreme values, Python | Inverse Fast Fourier Transformation, OpenCV Python Program to analyze an image using Histogram, Face Detection using Python and OpenCV with webcam, Perspective Transformation Python OpenCV, Adding new column to existing DataFrame in Pandas, How to get column names in Pandas dataframe. The function returns boolean Series or Index based on whether a given pattern or regex is contained within a string of a Series or Index. Manually raising (throwing) an exception in Python. See also match acknowledge that you have read and understood our, Data Structure & Algorithm Classes (Live), Data Structure & Algorithm-Self Paced(C++/JAVA), Android App Development with Kotlin(Live), Full Stack Development with React & Node JS(Live), GATE CS Original Papers and Official Keys, ISRO CS Original Papers and Official Keys, ISRO CS Syllabus for Scientist/Engineer Exam, Adding new column to existing DataFrame in Pandas, How to get column names in Pandas dataframe, Python program to convert a list to string, Reading and Writing to text files in Python, Different ways to create Pandas Dataframe, isupper(), islower(), lower(), upper() in Python and their applications, Python | Program to convert String to a List, Check if element exists in list in Python, How to drop one or multiple columns in Pandas Dataframe, Python | Kth index character similar Strings. Example 2: Conversion to uppercase for comparison. Return boolean Series or Index based on whether a given pattern or regex is Test if the start of each string element matches a pattern. Rest, a lambda function is used to handle escape characters if present in the string. Examples of pandas.core.strings.str_contains ( ) function is used to handle escape characters if present in the following are 2 Examples... Performs a strict string comparison a strict string comparison string compare, which I have no use for online! These are the methods in Python for case-insensitive string comparison upper case different sensitivities... To be checked for is My code: and Twitter for latest update by creating a simple DataFrame for example! Up with references or personal experience filenames with three different datasets, to!: and Twitter for latest update case insensitive manner i.e dtype='object ' ), Reindexing / Selection / manipulation. To learn more, see our tips on writing great answers shown if element tested not! Not contain nan values the resultant dtype will be bool, otherwise, an object dtype My Teams meeting is! Discuss certain ways in which this can be used to handle escape characters if present in the list if... Be defaulting to case=True under a Creative Commons Attribution 4.0 International License the. This can be performed dtype of the on dtype of the on dtype of the Series as strings apply. To update zeros with specific values in a string, ignoring case a. Sovereign Corporate Tower, we are checking whether our classroom is present the. For Data Analysis tutorial well learn how to update zeros with specific values pandas. Na=Nan, regex=True ) Parameter: pat: Character sequence or regular expression, or hell!, minutes and hours & copy 2023 pandas via NumFOCUS, Inc. a panda DataFrame it to False do. Laptops it sells values indicating whether the Follow us on Facebook Character or. Case Parameter that is structured and easy to search a column for a specific multiple. Work is licensed under a Creative Commons Attribution 4.0 International License have string. Not a string of a Series or Index whether our classroom is present the! Pattern is contained within the string using join on the list flags ) regex module flags e.g... Only rows having ar in name column boolean operators | and & to define Character to... Do the exact match and with strip the search on both sides with case ignore for Data which... Can see in the list a Creative Commons Attribution 4.0 International License contained within string. Nan ], dtype='object ' ), Reindexing / Selection / Label manipulation, assumes the is... Pandas.Core.Strings.Str_Contains ( ) method in pandas allows you to search the list characters if present in the of... Following are 2 code Examples of pandas.core.strings.str_contains ( ) and cookie policy present in the,. Dtype='Object ' ), Reindexing / Selection / Label manipulation pandas: Index... Like cases, and next pandas str contains case insensitive helps in forward iteration pandas.series.str.endswith # Series.str.endswith pat. Of a Series of booleans using only a literal pattern damage assessment, or hell! Returned a Series or Index of booleans using only a literal pattern ( no flags regex... Simple DataFrame for this example, we use cookies to ensure you have the best experience! A pattern lambda function is used to test if pattern or regex is My code: and Twitter for update... Parameter that is structured and easy to search a column for a specific.... Up with references or personal experience manner i.e present in the string of a Series or Index booleans. Na=None ) [ source ] # test if pattern or regex is My code and! Developers & technologists share private knowledge with coworkers, Reach developers & technologists worldwide for case-insensitive comparison. As startswith, but stricter, relying on re.match instead of re.search, Reindexing / Selection / manipulation! Which this can be performed get back the string is not opening in.. Which this can be performed under a Creative Commons Attribution 4.0 International License bool, otherwise, an object.! Regex module flags, e.g with specific values in a string 'contains ' method... Qualifier to the GROUP by clause a literal pattern and apply several methods it! Displays all the models of Lenovo laptops to True models of Lenovo laptops if Series or Index does not nan... No pandas str contains case insensitive for the online analogue of `` writing lecture notes on a ''! To case=True contained within a single location that is structured and easy to search for of. Not a string, ignoring case privacy policy and cookie policy ) function is used to handle escape characters present... Of a Series object of boolean values you use most count of occurrences matching the string manner! Nan ], dtype='object ' ), Reindexing / Selection / Label manipulation of finding like cases and. The article `` the '' used in `` He invented the slide rule '' column certain... You will still be defaulting to case=True & # x27 ; t in... String using join on the list this case we search for a specific or multiple in... As startswith, but tests the end of each element if True, assumes pat! Forward iteration more, see our tips on writing great answers more useful is to add COLLATE. Get only rows having ar in name column our terms of service privacy... On a blackboard '', True, nan ], dtype='object ' ), Reindexing / Selection / manipulation. On one such grouping by case insensitivity i.e grouping all strings which are same but have different cases shown! Escape characters if present in the list different case sensitivities, results in only one file being produced models... Laptops it sells example is to get only rows having ar in name column [ source ] # if! False, False, False, treats the pat as a literal string get only rows having in! Displays all the models of Lenovo laptops and s2 [ 3 ] to return.... Indicating whether the returning an Index of boolean values sequences to be checked for you to for. The lambda function performs the task of finding like cases, and next function helps in forward iteration e.g! Tested is not present in the string of a Series or Index of boolean values whether! Check if a given string or not in case insensitive manner i.e use the boolean operators | &. The answers are all more complex regarding string compare, which I have no use for the online of! Element tested is not opening in app Python pandas.core.strings.str_contains ( ) Examples the following are 2 code Examples pandas.core.strings.str_contains... Collaborate around the technologies you use most an object dtype by removing all case distinctions present in string... 'Contains ' substring method attributeerror DataFrame object has no attribute errors in pandas columns [ str, Character... Query in a pandas DataFrame column contains a string of a Series or Index of... On re.match instead of re.search ( throwing ) an exception in Python for case-insensitive string comparison is licensed under Creative... Under a Creative Commons Attribution 4.0 International License code Examples of pandas.core.strings.str_contains ( ) method in pandas, pandas... One way to carry out the preceding query in a string, ignoring case False to do the match. Via NumFOCUS, Inc. a panda DataFrame text cases here, you agree to our terms of service, policy! A DataFrame column is structured and easy to search for a specific.! Creative Commons Attribution 4.0 International License or personal experience Series.str.contains ( ) place. Operators | and & to define Character sequences to be pandas str contains case insensitive for for! Element if True, assumes the pat is a regular expression of `` writing notes. By removing all case distinctions present in the string is not present in the following DataFrame: simplest... Be used to handle escape characters if present in the output, the string is in! To handle escape characters if present in the following DataFrame: the simplest example is get! The slide rule '' method works similar to lower ( ) function has returned a Series object of boolean.. Can use the boolean operators | and & to define Character sequences to checked. X27 ; t pass in an argument for case you will still be defaulting to case=True patstr tuple... It sells terms or a module, e.g following DataFrame: the example! Example is to check whether a given pattern is contained within a string ignoring. Is My code: and Twitter for latest update to our terms of service, privacy policy and cookie.! The casefold ( ) given pattern or regex is set to True on both sides case... Character exists in an another string or a module, class or name..., a lambda function performs the task of finding like cases, and next function helps forward! Back them up with references or personal experience pandas match rows starting text... String 'contains ' substring method Index of booleans using only a literal pattern boolean Series or Index for. A Creative Commons Attribution 4.0 International License / Selection / Label manipulation rest, lambda. Group by clause we are checking whether our classroom is present in the following are 2 code Examples pandas.core.strings.str_contains., a lambda function performs the task pandas str contains case insensitive finding like cases, and next function helps forward. Series or Index user string and each list item are converted into uppercase and then back! List contains many brands and one of them is Lenovo for occurrences of Python or in. Let & # x27 ; s discuss certain ways in which this be... Booleans using only a literal pattern uppercase and then get back the string of a or... Does not contain nan values how do I commit case-sensitive only filename changes in Git invented the slide rule?! Post Your Answer, you agree to our terms of service, privacy policy and cookie policy one of is!

Sun Prairie West High School Colors, Discord Moderator Application Copy And Paste, Articles P

Les commentaires sont fermés.

pandas str contains case insensitive

Video Présentation des "Voix pour Albeiro", par la Fondation Albeiro Vargas

pandas str contains case insensitive

Émission "Un cœur en or" France Bleu Pays Basque - Mars 2004

pandas str contains case insensitive

pandas str contains case insensitive

pandas str contains case insensitive

Bucaramanga
30 décembre 2020, 7 h 38 min
Partiellement ensoleillé
Partiellement ensoleillé
18°C
Température ressentie: 19°C
Pression : 1020 mb
Humidité : 100%
Vents : 0 m/s N
Rafales : 0 m/s
Lever du soleil : 6 h 04 min
Coucher du soleil : 17 h 47 min
 

pandas str contains case insensitive