Astype Function - Convert The Datatypes || Python Pandas Tutorial - 6

Publicado em: 25 Junho 2025
no canal de: Data Science Lovers
196
11

Astype() Function - To convert the data type of a column (series) to a new data type.
['column_name'].astype(int) - Convert to Integer
['column_name'].astype(str) - Convert to String
['column_name'].astype(float) - Convert to Float
['column_name'].astype(category) - Convert to Category

We can use dictionary format, to convert the datatype of 2 or more columns at once :
df.astype( {‘Col_1’ : float , ‘Col_2’ : int} )

More Advanced Features will be covered in Advance Pandas Playlist.
Stay tuned !

--------------------------------------------

Download - Python Pandas Notes ( Rs.50 ) - http://bit.ly/3KxMpgA

Download - Complete Course Notes - Data Analyst Self Study Material - https://datasciencelovers.graphy.com/...

Pandas Playlist -    • Pandas For Data Science  
Numpy Playlist -    • Numpy For Data Science  

-----------------------------------------------
Enroll in our Udemy courses :
1. Python Data Analytics Projects - https://www.udemy.com/course/bigdata-...
2. Python For Data Science - https://www.udemy.com/course/python-f...
3. Numpy For Data Science - https://www.udemy.com/course/python-n...
-----------------------------------------------

Download Free Core Python Notes - https://datasciencelovers.graphy.com/...

-----------------------------------------------

Watch demo of Self Study Material -    • Python Data Analytics | Self Study Notes w...  

Outside India, PayPal for Self Study Material ($5) - datasciencelovers@gmail.com

----------------------------------------------------------
Contact Mail Id : datasciencelovers@gmail.com

-----------------------------------------------------------

You must check our project videos :

Project 1 -    • Project - 1 | Data Analysis with Python | ...  
Project 2 -    • Project - 2 | Data Analysis with Python | ...  
Project 3 -    • Project - 3 | Data Analysis with Python | ...  
Project 4 -    • Project - 4 | Data Analysis with Python | ...  
Project 5 -    • Project - 5 | Data Analysis with Python | ...  
Project 6 -    • Project - 6 | Data Analysis with Python | ...  
Project 7 -    • Project - 7 | Data Analysis with Python | ...  
Project 8 -    • Project - 8 | Data Analysis with Python | ...  


#pandas #python #datascience


Nesta página do site você pode assistir ao vídeo on-line Astype Function - Convert The Datatypes || Python Pandas Tutorial - 6 duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Data Science Lovers 25 Junho 2025, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 196 vezes e gostou 11 espectadores. Boa visualização!