SPLIT PANDAS COLUMN | How to split items into multiple columns in a dataframe (Python)

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

Did you find this video helpful? Consider subscribing for weekly tips, tricks, and tutorials.

Data & Jupyter Notebook with explanations provided at the github link below

0:00 Intro
0:10 Fast Answer
0:51 Sett up
1:48 Simple Split
3:04 n argument
3:50 expand argument
4:41 rename method
6:00 Append to df
7:14 replace method
8:13 NaN & uneven splits
Рекомендации по теме
Комментарии
Автор

Thank you so much. I spent ages googling only to find the answer in the first 15 seconds of your video. You earned a new sub

HousedHorse
Автор

I really love this video !! After 5 hours of searching I found it and save my night and my class thank you so mucho

nathalycoello
Автор

I totally needed this video yesterday!

DrNickBailey
Автор

Just what i was looking for. made very easy. Thanks

ritaadesina
Автор

This video is actually very very very useful thankyou so much

pentiumgammer
Автор

Great explanation just a request to make the text or notebook more bigger. May be zoom out

ANAND
Автор

Thanks!!! you save me a lot of time!!!!

Baidaba.la.strada
Автор

Sos un genio. Simple y conciso. Excelente aporte!

agusxxiv
Автор

Thank you so much for this easy to follow video! Much appreciated! you saved me a headache :)

dianacastro
Автор

thanks man! you're doing a great job!

kieselgur
Автор

Well explained, helped me a lot, thanks. :D

adrianrc
Автор

Hey, great video. I am working on similar data but need to iterate through the variable similar to your "favourite_foods" and split it into separate strings and save them in a list of lists containing unique items only. So in the case of favourite_foods it would look like this: [['hot-dog'], [['fried chicken'], ['pizza']....] Can you help?

slepenki
Автор

Thanks for an interesting tutorial! One question:
I have a time series of data that is in one column named "value", and one column named "date". I have split the date up into day, month and year. So in total I now have 4 columns.
I would like to split this long list of values based on the years, and have each year be represented in a separate column. How can this be done using pandas? Appreciate any help!

emf
Автор

Hi, Great Video. I have a question. If I have a .txt file that contains 12 columns but when I read im only getting one column? that .txt file does not contain a title for each column. Any suggestions?

sathasivam
Автор

Hi, whats the online interpretator name used in this video?

sorinsoso
Автор

How to get data of specific timestamp in one dataframe and another range timestamp in another dataframe and plot a graph for comparison

imaansarwar
Автор

can you split a colun with multiple conditions?

jenivonalow
Автор

What if only first name present in the email. Just the first name like robert. In that case how we can put the first name and leave the last name empty ?

revathycassilingam
Автор

Trying to use the similar code as: df[['fav1', 'fav2', 'fav3']] = df['favorite_foods'].str.split(', ', expand=True)
if 3rd flavor is not available its returning 'None' as a value.

However, when Im running the similar code then following error is coming: "ValueError: Columns must be same length as key"

What to do?

TheKing
Автор

It was great, Actually I happen to be working on something similar. I have some comma separated values in a cell, how do I split them in a vertical manner rather than side by side.

abhishek_raj