Tag: numpy

Handling and Converting Data Types in Python Pandas

Handling and Converting Data Types in Python Pandas

Data types are one of those things that you don’t tend to care about until you get an error or some unexpected results. It is also one of the first things you should check once you load a new data into pandas for further analysis.

Chris Moffit

In this short tutorial, Chris shows how to the pandas dtypes map to the numpy and base Python data types.

A screenshot of the data type mapping.

Moreover, Chris demonstrates how to handle and convert data types so you can speed up your data analysis. Both using custom functions and anonymous lambda functions.

A snapshot from the original blog.

A very handy guide indeed, after which you will be able to read in your datasets into Python in the right format from the get-go!

Using data type casting, lambda functions, and functional programming to read in data in Python. Via pbpython.com/pandas_dtypes.html

Python for R users

Python for R users

Wanting to broaden your scope and learn a new programming language? This great workshop was given at EARL 2018 by Mango Solutions and helps R programmers transition into Python building on their existing R knowledge. The workshop includes exercises that introduce you to the key concepts of Python and some of its most powerful packages for data science, including numpy, pandas, sklearn, and seaborn.

Have a look at the associated workshop guide that walk you through the assignments, or at the github repo with all materials in Jupyter notebooks.

Python resources (free courses, books, & cheat sheets)

Python resources (free courses, books, & cheat sheets)

Find more comprehensive Python repositories:
Vinta’s awesome Python Github repository, the easy Python docs, the Python Wiki Beginners Guide, or CourseDuck’s overview of free Python courses!

My list of Python resources is still quite short so if you have additions, please comment below or contact me! There are separate overviews for Data Science, Machine Learning, & Statistics resources in general, and for R resources and SQL resources in specific.

LAST UPDATED: 11-11-2018

Cheat sheets:

Courses:

Books: