Pandas: Check If Value of Column Is Contained in Another Column in the Same Row

Опубликовано: 28 Сентябрь 2024
на канале: Softhints - Python, Linux, Pandas
2,985
28

Article:
https://blog.softhints.com/pandas-che...

Notebook:
https://github.com/softhints/python/b...

Dataset: IMDB 5000 Movie Dataset

Table of Contents
Step 1: Check If String Column Contains Substring of Another with Function
Step 2: Check If Column Contains Another Column with Lambda
Step 3: Fastest Way to Check If One Column Contains Another
Step 4: For Loop and df.iterrows() Version
Bonus Step: Check If List Column Contains Substring of Another with Function
Performance check

---------------------------------------------------------------------------------------------------------------------------------------------------------------
Bonus resources


---------------------------------------------------------------------------------------------------------------------------------------------------------------
Code store

github: https://github.com/softhints/python/
bitbucket: https://bitbucket.org/softhints/

Socials

site: https://softhints.com/
Facebook:   / 435421910242028  
Facebook:   / softhints  
Twitter:   / softwarehints  
Discord:   / discord