Back to Browse

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

194 views
Jun 25, 2025
8:13

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/products/Python---Data-Analytics-Study-Material-64d7b0bdfd6efd7c4587e233?dgps_s=dsh&dgps_u=c&dgps_uid=64cb5694e4b000cf748a30c2&dgps_t=cp_m Pandas Playlist - https://www.youtube.com/playlist?list=PLy3lFw0OTluuv6t-vFg8bQnc012hVWj-M Numpy Playlist - https://www.youtube.com/playlist?list=PLy3lFw0OTluv2B7VgreJWX72r6OXwkxQe ----------------------------------------------- Enroll in our Udemy courses : 1. Python Data Analytics Projects - https://www.udemy.com/course/bigdata-analysis-python/?referralCode=F75B5F25D61BD4E5F161 2. Python For Data Science - https://www.udemy.com/course/python-for-data-science-real-time-exercises/?referralCode=9C91F0B8A3F0EB67FE67 3. Numpy For Data Science - https://www.udemy.com/course/python-numpy-exercises/?referralCode=FF9EDB87794FED46CBDF ----------------------------------------------- Download Free Core Python Notes - https://datasciencelovers.graphy.com/products/Core-Python-Notes-64d116f7c7a9985f7b99a5bf?dgps_s=dsh&dgps_u=c&dgps_uid=64cb5694e4b000cf748a30c2&dgps_t=cp_m ----------------------------------------------- Watch demo of Self Study Material - https://youtu.be/LoFpsODdkuo Outside India, PayPal for Self Study Material ($5) - [email protected] ---------------------------------------------------------- Contact Mail Id : [email protected] ----------------------------------------------------------- You must check our project videos : Project 1 - https://youtu.be/4hYOkHijtNw Project 2 - https://www.youtube.com/watch?v=fhiUl7f5DnI Project 3 - https://youtu.be/GyUbo45mVSE Project 4 - https://youtu.be/89eYAAPyRfo Project 5 - https://youtu.be/q-Omt6LgRLc Project 6 - https://youtu.be/e1zKFSrKeLs Project 7 - https://youtu.be/AO5uhxa1R84 Project 8 - https://youtu.be/b7Kd0fLwgO4 #pandas #python #datascience

Download

0 formats

No download links available.

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