Extract a sub-string in Python Pandas - Step 2

preview_player
Показать описание

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

I recently joined a company as data Analyst, I am new to Python, My first “try-out” task was to extract order numbers from a messy data like yours! This video really helped me to create a first impression to my team leader.,
You have no Idea how much this video helped me! Thank you bro! 🙏🏼

niaz
Автор

I watched many videos, long ones, and your 3min video solved my problem even before the 2nd minute was up. Thank you!

scorpio
Автор

Buen hombre gracias por su contenido, se ha ganado su buen Like

juandiegorodriguez
Автор

[ ' - ' ] ...The visibility is fine at 720, great at 1080. Cheers mate, not what I was after but nice you did this recording!

aidanmacdougall
Автор

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
welcome to shbcf.ru