Python, Pandas, Data Science, Machine Learning, Pandas Dataframe.
df["Car"] = df["Car"].astype('category') df["Car"].memory_usage(index=False, deep=False) #1000364 We can also specify the data types when reading files. dtypes = { 'CID' : 'int32', 'Name' : 'object', 'Age' : 'int8', ... } dates=["Date Columns Here"] df = pd.read_csv(dtype=dtypes, parse_dates=dates)