How do I change the data type of a pandas Series?

preview_player
Показать описание
Have you ever tried to do math with a pandas Series that you thought was numeric, but it turned out that your numbers were stored as strings? In this video, I'll demonstrate two different ways to change the data type of a Series so that you can fix incorrect data types. I'll also show you the easiest way to convert a boolean Series to integers, which is useful for creating dummy/indicator variables for machine learning.

SUBSCRIBE to learn data science with Python:

JOIN the "Data School Insiders" community and receive exclusive rewards:

== RESOURCES ==

== LET'S CONNECT! ==
Рекомендации по теме
Комментарии
Автор

I started learning Python/Pandas since a couple of weeks and have been searching for the best resources.
So glad I found you, such a natural born teacher, I am really enjoying your videos.
Excellent explanations, speed is spot on, good intonation and just a very friendly overall voice!
Data school is my clear top favourite channel followed by Corey Schafer & Keith Galli

bob-pqef
Автор

great that you mentioned about casting object type as numeric. two days ago in my normal python code (not pandas) I was trying to do math comparison and was failing.. It took me half an hour to cast it! cheers as you mention every important thing clearly and elaborate them. They are usefull. I wish I could start learning pandas by the time you made these videos!

uguree
Автор

Just what I needed! Great explanation and visuals! Subscribed!

tankgirl
Автор

You're my hero, man. I corrected the mistakes of the project. Before I saw this video, I didn't understand much from the sources I looked at. Thanks :)

MemeFolly
Автор

this is absolutely brilliant and exactly what i was looking for. thank you.

iphner
Автор

This lecture was amazing!!! Keep up the awesome work Sir!

ayush
Автор

You're cool! If you could recommend a a series of tutorials on how to take a CSV file with a bunch of columns and columns headers and do histogram and statistics on header-specified columns and build a quick report, that would be terrific. Your courses are outstanding I absolutely love them. Kudos!

youcefyahiaoui
Автор

Your videos are informative for a beginner like me in Python. More power to you.

harrmeshthakkar
Автор

Thank you for these very useful and easy to read videos!

yolindabaquero
Автор

Sir thanks a tonne to u for making time n teach us all interested people....teacher like u is rare ...

akashpoudel
Автор

one of the best video on pandas...keep making

MrMukulpandey
Автор

this is brilliant and exactly what i was looking for. thank you.

levinapradhan
Автор

Very useful video, helps me out of many bugs, thanks for sharing.

renzhizhao
Автор

No need for suggestion, your are just incredible.

ehsanghorbankhani
Автор

Excellent man, thanks! Regards from Costa Rica.

anthonyfernandezgonzalez
Автор

Hi. Thanks for a good demo on converting a string to a float.

raymondnyakuwocha
Автор

These are great videos. Really helpful. 👍

rxehbbx
Автор

I very much congratulate you for sharing code used in video with us. Many thanks for that. It is very much useful to me. My warm regards to you.

s.baskaravishnu
Автор

Learning a lot from your videos. Thank you so much.

dclee
Автор

Thanks a lot a was searching for a simple solution, and I found it in this video :)

PoPissable