python pandas处理大数据节省内存的方法

python pandas处理大数据节省内存的方法 数值类型的列进行降级处理 字符串类型的列转化为类别类型(category) 字符串类型的列的类别数超过总行数的一半时,建议使用object类型 ''' 减小内存的使用 ''' def reduce_mem_usage(df, verbose=True): numerics = ['int16', 'int32', 'int64', 'fl
相关文章
相关标签/搜索