pandas dataframe search for string in all columns filter regex

preview_player
Показать описание
Pandas search in column, every column and regex - the notebook

Data Wrangling with pandas Cheat Sheet

A gallery of interesting Jupyter Notebooks

* Read tabular data from PDF
* Dataframe Search in a single column for a string
* Dataframe Search in every column for a string
* Dataframe search with regular expression
* Dataframe transpose

0:00 intro
1:40 Read tabular data from PDF
2:45 Dataframe Search in a single column for a string
4:07 Dataframe Search in every column for a string
6:00 Dataframe search with regular expression
7:29 Dataframe transpose

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

Socials

If you really find this channel useful and enjoy the content, you're welcome to support me and this channel with a small donation via PayPal.

Рекомендации по теме
Комментарии
Автор

this is the best youtube channel.... it literally helped me after being stuck on a part of a question for 12 days im in tears man your the best thank you thank you thank you so much for this video and explaining it with easy and simple words :) :) :)

asliceofcake
Автор

I'm very new to Python, so I might be about to list an issue for which there's a very easy explanation. First, thank you for uploading the tutorial. I'm working with the code now. I hit a problem at line 2. The response I get from Jupiter Notebooks for this command "from tabulate import tabulate" is "ModuleNotFoundError Traceback (most recent call last)
in <module>
----> 1 from tabulate import tabulate

ModuleNotFoundError: No module named 'tabulate'

joelprestonsmith
Автор

Hi, can we use regex to search strings of a column of df1 from the column of df2

satishkumar-irwy
Автор

Thanks. The cheat sheet has been very useful for a new learner like me.

morrischeung
Автор

For the clever ones:
* Read tabular data from PDF - 1:40
* Dataframe Search in a single column for a string - 2:45
* Dataframe Search in every column for a string - 4:07
* Dataframe search with regular expression - 6:00
* Dataframe transpose 7:29

softhints
Автор

Hey bro, I need to fetch a particular string from a particular column in which the string is (incase sensitive). For example ( vin Diesel, VIn Diesel, vindiesel) it should recognise both as same . How do I do that ?

-HarishkumarG
Автор

Hi, I need help in solving a problem

assume two dataframe

df1 = pd.DataFrame({'Text': ['Some text 1', 'Some text 2', 'The monkey eats a banana', 'Some text 4']})
df2 = pd.DataFrame({'Keyword': ['apple', 'banana', 'chicken'], 'Type': ['fruit', 'fruit', 'meat']})

df1

Text
0 Some text 1
1 Some text 2
2 The monkey eats a banana
3 Some text 4

df2

Keyword Type
0 apple fruit
1 banana fruit
2 chicken meat


Thus, the preferable outcome would be:

Text Type
0 Some text 1 -
1 Some text 2 -
2 The monkey eats a banana fruit
3 Some text 4 -


the problem, however, is that banana is in a sentence not a standalone value.

Thanks in advance

smstoaj
Автор

Hello i have seen your code in 4:07, ut what i want to filter is the exact string how can i do that changing str.contains for str.equal?

jesus
Автор

Say you have a dataframe called df1 and you have another dataframe called df2. Is there a way you can search for the row and column that match all rows and columns in df2 and return the matching value? Hopefully im making sense

Dopeboyz
Автор

How do you do the same thing with CSV files?

tarsus
Автор

Hey i m using this code but rather than giving me True and false it's giving me Nan. Please help me

forsaken
Автор

Hey i have a doubt in this will you help me please

aravindravindranatha
Автор

Cannot join the Discord, it's said invitation invalid

yuerbb
Автор

ЧУВААААК записывай лучше на русском гайды, либо попрактикуй произношение, палишься!!!)))

nafanyya
join shbcf.ru