Skip to content

pandas astype

Convert a column to another dtype — int, float, category, string, and more.

Below are the 68 Bamboo Weekly exercises that use astype on real-world data — try each one, then study the worked solution.

Part of the Pandas Methods Index. See also practice by skill.