AI, Python, Cognitive Neuroscience
3.87K subscribers
1.09K photos
47 videos
78 files
893 links
Download Telegram
🐼🤹‍♂️ pandas trick:
Two easy ways to reduce DataFrame memory usage:
1. Only read in columns you need
2. Use 'category' data type with categorical data

Example:
df = pd.read_csv('file.csv', usecols=['A', 'C', 'D'], dtype={'D':'category'})

#Python #DataScience

✴️ @AI_Python_EN