Columns Types, .assign, and Memory Usage
Explore updating columns, creating columns, and changing the types of columns.
We'll cover the following...
Conversion methods
There are various methods and functions for changing the types of a Series in pandas. We can call astype
to update column types. Or we can use the assign
method to return a new DataFrame with the updated type.
The astype
method allows us to specify the types of each column with a dictionary.
The assign
method is a ...