ref_url: https://twitter.com/justmarkham/status/1192794326763474944 ref_name: Kevin Markham's Twitter ---
πΌπ€ΉββοΈ pandas trick #83:
— Kevin Markham (@justmarkham) November 8, 2019
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 pic.twitter.com/10DeKtc6wj