Loading tutorials
info() prints.3 min readint64, float64 and object. Here you will learn the fixed sizes and value ranges of the numeric dtypes. The next chapters use these facts to pick smaller types safely.3 min readint64, float64, object). It also assumes you have seen memory_usage(deep=True), which this chapter uses to measure savings.2 min readfloat64 and float32 as dtype names, and that you have used pd.to_numeric to downcast integers. Floats follow the same idea, with one difference. Integer downcasting is exact when the values fit the range. Float downcasting usually loses digits.3 min readmemory_usage(deep=True) output and know that pandas columns have dtypes such as int64 and object. Here you will see why a string column costs far more than a numeric column with the same number of rows.3 min readdtypes, and use memory_usage(deep=True) from the earlier chapters. It covers the category dtype, which is the main way to shrink columns of repeated strings.2 min readobject and int64, and have used memory_usage(deep=True). Earlier chapters showed that category shrinks repetitive string columns. Here you decide when it is worth using.3 min readcategory dtype from the previous chapters, and you know that integer dtypes have fixed sizes. It explains how a categorical column is stored, so the memory savings and the behavior you see later make sense.3 min readastype("category") and know that a categorical column stores a list of categories plus an integer code per row. It covers four problems that appear after the conversion: new values, groupby output, comparisons, and combining frames.2 min readpd.to_numeric and convert strings to category. It also assumes you know the basic NumPy dtypes. Downcasting makes columns smaller, but a smaller dtype can change your values. You need to confirm that it didn't.2 min readpd.read_csv, know the dtypes int64, float64 and object, and have seen downcasting and category in the earlier chapters.2 min readmemory_usage(deep=True), downcast with pd.to_numeric, and convert strings to category.3 min read