RT @[email protected]

πŸΌπŸ€Ήβ€β™‚οΈ pandas trick #83:

Problem: Your dataset has many columns and you want to ensure the correct data types

Solution:
1. Create CSV of column names & dtypes
2. Read it into a DF
3. Convert it to dict
4. Use dict to specify dtypes of dataset

πŸ‘‡ Example πŸ‘‡

#Python #pandastricks

πŸ¦πŸ”—: https://twitter.com/justmarkham/status/1192794326763474944

Kevin Markham on Twitter

β€œπŸΌπŸ€Ήβ€β™‚οΈ pandas trick #83: Problem: Your dataset has many columns and you want to ensure the correct data types Solution: 1. Create CSV of column names & dtypes 2. Read it into a DF 3. Convert it to dict 4. Use dict to specify dtypes of dataset πŸ‘‡ Example πŸ‘‡ #Python #pandastricks”

Twitter